7
Just realized CSS Grid beats Flexbox HANDS DOWN for card layouts
I spent like 3 hours last week fighting with Flexbox to make a gallery of 20 product cards line up perfectly. No matter what I did, the last row ALWAYS looked wonky with different sized gaps. Then I swapped to CSS Grid with `grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))` and it fixed EVERYTHING in like 10 minutes. The rows actually align and the cards stretch evenly without me guessing margins. Has anyone else had that moment where you stubbornly stick with one method way too long?
1 comments
Log in to join the discussion
Log In1 Comment
ray2101h agoProlific Poster
I mean flexbox still has its place for simpler stuff though.
8