grid-area
Widely availableSince 201797% of users
A shorthand property that lets you assign an element to a specific named area or set of lines within a CSS Grid, defining its position and size in one line.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyClassicIt has worked everywhere since October 2017.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
See individual properties- Inherited
- No
- Applies to
- grid items and boxes within a grid container
- Animation type
- discrete
Quick example
.main-content {
/* Spans from row line 1 to 3, and column line 2 to 4 */
grid-area: 1 / 2 / 3 / 4;
}
.sidebar {
/* Assigns the element to the named 'sidebar' area */
grid-area: sidebar;
}grid-area 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