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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help