Promptles
Frontend & Responsive Design

CSS Grid

intermediate

Definition

A way of arranging things on a webpage into neat rows and columns at the same time: like a spreadsheet you can place items into. It's the right tool for page layouts, photo galleries, and anything that needs to line up in a tidy grid.

In the wild

A photo gallery shows pictures in a grid that has four columns on a wide laptop, two columns on a tablet, and just one column on a phone: automatically rearranging itself as the window changes size, with each photo always in its own neat cell.

More from Frontend & Responsive Design