I've created a modern masonry grid again — this time CSS-only.
masonry-grid.js.org·1d·
Discuss: r/javascript
Flag this post

I recently published an article about Masonry Grid, and here I am again with another post. What happened?

Well, something interesting popped up in the Reddit comments.

After sharing the initial release, Zardoz84 in the comments linked to a clever CSS-only masonry example. The example used a neat trick with grid-row: span X to create a masonry effect without any JavaScript.

The original example was hand-tuned for specific content, but the technique itself caught my attention. Could this approach work with dynamic content?

Adapting the Span Trick

[Section titled “Adapting the Span Trick”](#adapting-the-spa…

Similar Posts

Loading similar posts...