Flexbox arranges items along one line. CSS Grid is built for the other half of the problem: laying out a page in rows and columns at the same time. It lets you define the structure of a layout in your CSS and then place content into it, which makes page-level layouts, dashboards, galleries, and card grids far simpler than they used to be.
This module starts with a beginner-friendly tour of Grid: defining columns, spanning cells, and placing items. It then introduces grid-template-areas, a visual way to name the regions of a layout and the fr unit for sharing space. From there you'll build responsive grids with repeat, minmax, and auto-fit that adapt to the screen without extra media queries, and finish with subgrid, which lets nested elements line up with the parent grid.
Watch the lessons in order, then continue on to Responsive Design.
A practical walkthrough of Grid: using the grid inspector, choosing how many columns you need, spanning columns, placing items, working with line numbers, and adapting with media queries.
Uses the grid-template-areas property to set the grid structure visually, then covers grid-template-rows, grid-template-columns, and how the fraction (fr) unit works.
Shows how repeat(), minmax(), fractions, and auto-fit combine to make grids that wrap and resize responsively.
Explains subgrid step by step: how it lets items of nested grids align to the parent grid, and how to use it.