An Interactive Guide to CSS Grid
joshwcomeau.com
joshwcomeau.com
I developed a fondness for that website because I kept referencing their page for flexbox: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
It's a classic at this point! :-D
These days I use named grids most of the time. Named grids are easier to look at than numbers especially coming back to a codebase after a couple of months.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_la...
I love CSS Grid. When you’ve got a design that really needs it, it feels like magic. But truthfully, I so often try to use it but wind up back with flexbox. Or there’s some quirk to a design that just doesn’t work out. Subgrid will make it much more usable (at least as I understand it) and I’m very excited for it to have wider support.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_la...
1 2 3 4
5 6 7 8
9 10
[1] https://cssgridgarden.com/ [2] https://flexboxfroggy.com/
I'm not making excuses for my ignorance —I use grid daily— it's just easier to visualise and label, well, visually.
There are many online grid generators, but I use https://grid.layoutit.com/
I never need div, wrapper or container. Remnants of the old world. It’s body display:grid and then come the (subgrids) nav header main aside and footer without any class or id obfuscation. :)
Now with the semantic web dead, can't we just use table like the good old days?
In the early days, all you needed is one layout, and seeing the structure of your html tags was intuitive.
Today, you use "table" tags for mainly tables and css for layouts. Separate of concerns?
Using tables was hell compared to Grid. First time I've seen this described as "good."
That is why videos are so effective. Would you rather watch a oil painting lesson or a read an book on oil painting?
CSS tutorial channels on youtube have millions of subscribers, there's a reason for that.
Learn web development (HTML, CSS, JS) - https://developer.mozilla.org/en-US/docs/Learn