19
My kid's school project made me rethink grid areas
He was trying to make a poster about the solar system and got stuck trying to line up the planets. I showed him how to name grid areas for each one, and he said 'so it's like giving each planet its own room?' That clicked for me more than any tutorial. How do you explain grid-template-areas to someone totally new?
3 comments
Log in to join the discussion
Log In3 Comments
casey_campbell28d ago
That's a great way to think about it, but I'd say it's more like assigning each planet its own parking space on a map. The 'room' idea is close, but grid areas are really about specific, fixed coordinates. That visual of a map or a blueprint finally made it stick for me.
10
margaret_lane28d ago
Margaret, it's just CSS for a poster.
5
miller.paul8d ago
So what I'm wondering though @margaret_lane is if you've ever run into that issue where the poster's layout breaks on a smaller screen? Grid areas are great for static designs like a movie poster, but if someone tries to resize the browser, things can get real messy real fast. I usually end up either setting hard pixel widths or using a fallback flex layout for narrow viewports, which kinda defeats the simplicity of the grid approach in the first place.
5