CSS grid area Property
CSS grid-area Property
The grid-area property is used to define a grid item size and location in a grid layout. It is a shorthand property for:-
- grid-row-start
- grid-column-start
- grid-row-end
- grid-column-end
It is used to assign a name to a grid item. Named grid items can then be referenced by the grid-template-areas property of the grid container.
Default Value:-
Its default is:- auto / auto / auto / auto
Syntax:-
Its syntax is:- grid-area: grid-row-start / grid-column-start / grid-row-end / grid-column-end | itemname;
Further Explanation:-
Value | Description |
---|---|
grid-row-start | Specifies on which row to start displaying the item. |
grid-column-start | Specifies on which column to start displaying the item. |
grid-row-end | Specifies on which row-line to stop displaying the item, or how many rows to span. |
grid-column-end | Specifies on which column-line to stop displaying the item, or how many columns to span. |
itemname | Specifies a name for the grid item |