Grid by Example

Everything you need to learn CSS Grid Layout

Padding is honored on the subgrid

If you add padding to the subgrid then this is honored. In our example I have added 50px of padding to the subgrid. The first and last column tracks therefore each become smaller as they have the padding eating into their space. Everything still lines up with the parent tracks however.

Read the specification | View example as full page

See the Pen Grid by Example 2.8: padding is honored on the subgrid. by rachelandrew (@rachelandrew) on CodePen.