grid-auto-flow: dense
to tightly pack items.grid-auto-flow: dense
via custom CSS in Webflow since it's not available in the visual UI.To build a true masonry (Pinterest-style) layout in Webflow using pure CSS, avoid CSS columns and instead use CSS Grid with grid-auto-flow: dense
, which allows explicitly placed, gapless layouts across grid rows and columns.
Div Block
).repeat(auto-fit, minmax(250px, 1fr))
.grid-auto-flow: dense
in the visual UI.<style>
block in the page’s Before tag:
.masonry
)..masonry { grid-auto-flow: dense; }
.grid-template-columns
) at different screen sizes for responsiveness.To create a real masonry layout in Webflow with pure CSS, use CSS Grid with grid-auto-flow: dense
, not CSS columns. Set up your container with explicit columns, let child items vary in height, and apply custom CSS to enable dense packing. This achieves a true Pinterest-style layout while preserving accessibility and layout stability.