08: Grid Basics

The CSS grids start off the same way as Flexbox by using the display: grid property on a parent tag, and then the same setup of parent and child properties to control layout. The difference is that CSS grids are more for uniform layout.

I'm using the word "uniform" but that doesn't mean all of the cells need to be the same size. Uniform actually means that there are X columns by Y rows, even if each can have different sizes.

Simple 2D Uniform Grids

The simplest grid is where you give a parent tag the display: grid property and then specify how the grid is formed with grid-template-columns, grid-template-rows, and grid-template-areas.

80% Discount for Alpha 1

Register today for the early access release and get an 80% discount on the final release price. You'll get true lessons in true modules right now, and early access to content as it's released.

Still Not Sure? Check out more curriculum!