Webflow Layout Techniques

Masonry Grid Layouts

Overview
Responsive Layout Techniques
102
Element Layouts
Aspect Ratio
201
Responsive Image Annotations
6:50
202
Collection List Alternating Item Layouts
4:32
601
Collection Page & Collection List Layouts
Collection List Card Layouts
4:32
601
Creating Variable Layout Options, per Collection Item
11:46
602
Random List Items on Every Page Refresh
10:00
603
Variable Collection Item Sizes in a Grid Layout
603
Limit Collection List Items by Breakpoint
10:00
604
Hide Collection List on Empty, or Item Qty
605
Responsive Pagination
605
Masonry Grid Layouts
607
Glossary w/ Letter Groupings
612
Comparison Grid Layout
612
CMS Style Multiref-Matched Items
11:00
614
Master-Detail Layouts
Master-Detail Layouts
710
CMS-Driven Expando
19:42
714
Special Layouts
Creating Leader Lines
5:54
821
Photo Gallery Layouts
821
Column Layouts
822
Text Layouts
823
Checkerboard Grid Styling
824
Tetris Grid Layouts
12:00
826
Advanced Techniques
Breakpoints
901
No items found.
Published
May 9, 2023
Updated
in lightbox

Basic masonry grid layouts are a columnated layout in which each item has a variable height. This was first popularized by Pinterest but has become a favorite layout for photo galleries and card-style layouts worldwide.

There is also an advanced masonry grid layout which has the added characteristic that an individual item can span columns. However this is uncommon as it easily disrupts the tidy layout a masonry grid is famous for.

CSS-only Approach

You can implement an efficient masonry using CSS-only if you are OK with the flow of items running downward first, and then across second, like a newspaper article would read.

This is accomplished using CSS columns.

Custom code-

http://forum.webflow.com/t/masonry-grid-pinterest-in-webflow-created-by-css-only/21693

CSS-only-

https://discourse.webflow.com/t/webflow-masonry-grid-pinterest-no-custom-code-required/23551/77

Macy.js Approach

Masonry.js was one of the first to support masonry layouts, however it is not as robust and does not work smoothly with images of varying sizes.

Macy.js is a more modern variant which is far more robust.

  • It is easier to implement in Webflow
  • It is generally smoother in its layout operation
  • It has no dependencies, including jQuery
  • It is better with unknown-size images
  • It responsively supports varying column counts at different breakpoints

Example code;

  • Create a collection list of your elements
  • On the collection list element ( the middle one of the 3 ), add an ID of macy-container.
  • Add this custom code in the /body custom code section of your page

Cloneable Demo

Philipp Roth put together a cloneable demo of Macy.js here;

https://webflow.com/made-in-webflow/website/Masonry-Layout-with-Macyjs

While it might not be immediately obvious, you can make the designer view look representative of the Macy.js view. For example if you've configured Macy for 3 columns, you can set your collection list to a 3 column grid to look similar. Macy seems to handle this fine.

More Notes

http://macyjs.com/

https://github.com/bigbite/macy.js

https://codepen.io/memetican/pen/YzdqrVO/05f208fee2c695b965be9dcc9c9d0a3e?editors=0010

More notes

https://www.webflow-tools.refokus.com/tools/masonry-layout

https://forum.finsweet.com/t/mansonry-grid-that-will-work-with-cms-filter/1825/2?navigation_menu=null

Videos
No items found.
Table of Contents
Comments
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.