IT lexicon › Web › Subgrid

Subgrid

Web På svenska → Updated: 2026-07-29

Lets a nested grid inherit its parent's track lines instead of creating its own, so content inside separate children can line up with each other.

The standard example is a row of cards each containing a heading, body text and a button. Without subgrid every card is its own grid, so the button lands at a different height depending on how long the heading turned out, and the usual workaround has been fixed heights and hope. With grid-template-rows: subgrid the children participate in the parent's rows, every heading shares a row, every button shares a row, and the layout holds regardless of content length. The same applies to columns in forms where labels should align. The feature sat in the specification long before it was usable: Firefox had it in 2019, Safari in 2022 and Chrome only in September 2023.

← Back to the lexicon