CSS: getting started

Lesson 05 · 11 min

Grid: columns and rows

A two-dimensional grid. repeat and minmax so you don't count pixels by hand.

11 minLesson 5 of 8Practice includedAsk AI on any point

display: grid. grid-template-columns: 1fr 2fr — two columns, the second is wider. repeat(3, 1fr) — three equal ones. Cards: repeat(auto-fit, minmax(16rem, 1fr)) wrap by themselves. grid-gap is an outdated name: write gap.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.