grid-template
Widely availableSince 201797% of users
A powerhouse shorthand that lets you define 'grid-template-rows', 'grid-template-columns' and 'grid-template-areas' all at once. It can define a whole page layout in one property.
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
noneBaseline Jan 2020, Widely Jul 2022
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
See individual properties- Inherited
- No
- Applies to
- grid containers
Quick example
.page-layout {
display: grid;
/* rows / columns */
grid-template: 100px 1fr 50px / 250px 1fr;
}Values
nonegrid-template-rowsgrid-template-columnsgrid-template 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