Use this property to define the element's four edges with respect to the grid system.
Refer to these definitions to better understand how the property values are used.
Each reference to a grid line refers to the imaginary line on either side of grid cells.
For a layouts with N rows, there are N+1 horizontal grid lines — one at the top, one between each row, and one at the bottom.
For a layouts with M columns, there are M+1 vertical grid lines — one at the left edge, one between each column, and one at the right edge.
Grid lines are numbered starting at 1. For rows, the topmost line is 1 and the bottommost line is N+1. For columns, the leftmost line is 1 and the rightmost line is M+1. ** Arabic, Hebrew and other left-to-right writing systems, reverse everything.
Grid line aliases
For clarity and ease of use, each grid line can be aliased with an arbitrary name. That alias can be used with
grid-column-end property values.
Grid line aliases are defined when specifying
In addition, when a grid line alias is declared by the user within a
grid-template-areas definition, the browser implicitly defines two other names that can be used in those start/end properties. For example, if a
grid-template-areas defines an area named
|'foo-start'||grid-row-start||The topmost line of the area|
|'foo-start'||grid-column-start||The leftmost line of the area|
|'foo-end'||grid-row-end||The bottommost line of the area|
|'foo-end'||grid-column-end||The rightmost line of the area|
Specify the four grid lines that form the boundaries of this element. Use grid line numbers or aliases for each, separating them with solidus "/".
|1st value||Corresponds with the property |
|2nd value||Corresponds with the property |
|3rd value||Corresponds with the property |
|4th value||Corresponds with the property |
For example, this element is placed within topmost, leftmost cell of the container.
Alternatively, specify an alias name declared in the container's
grid-template-areas property. For example: