grid-template-rows
Widely availableSince 201797% of users
Defines the height of each row in a grid. You can set fixed heights, use percentages or the 'fr' unit to fill available vertical space.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyClassic, with newer partsIt has worked everywhere since October 2017, and it keeps getting newer values.
Newer parts of grid-template-rows
subgridBaseline Sept 2023, Widely Mar 2026Animation of tracksBaseline Oct 2022, Widely Apr 2025repeat()Baseline Jul 2020, Widely Jan 2023autoBaseline Jan 2020, Widely Jul 2022max-contentBaseline Jan 2020, Widely Jul 2022min-contentBaseline Jan 2020, Widely Jul 2022noneBaseline Jan 2020, Widely Jul 2022
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
none- Inherited
- No
- Applies to
- grid containers
- Animation type
- simpleListOfLpcDifferenceLpc
Quick example
.container {
display: grid;
/* Top row 80px, bottom row takes the rest of the height */
grid-template-rows: 80px 1fr;
}Values
nonesubgridgrid-template-rows browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2017.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
57+
52+
10.1+
16+Mobile
57+Android
52+Android
10.3+iOS