Caffeinated Coder
Book an appointment
Lesson 09 · Layout

CSS Grid

Flexbox lines boxes up in one direction; grid places them in rows and columns at once. Turn a div into a grid container, give it three column tracks (100px, 1fr and 2fr) and watch the five items flow into the cells in order. Work out by hand how fr shares the free space, see gap open gutters, make one item span from grid line 1 to line 4, then shrink the screen and watch the same CSS fit.

12 min8 steps5 questionsIntermediate
Fig 9 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.