CSS grid-row-end Property
Example
.item2 {
grid-row-end: span 2;
}
1
2
3
4
5
6
Meaning
The grid-row-end property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area.
Default value: | auto |
Inherited: | No |
Animatable: | Yes |
Version: | CSS Grid Layout Module Level 1 |
JavaScript syntax: |
|
Standard Syntax
grid-row-end: auto|row-line|span n|initial|inherite|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
auto | This is default value. The item will span one row. |
row-line | Specifies on which row to end the display of the item. |
span n | Specifies the number of rows the item will span. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
grid-row-end: auto;
}
More Example
Example
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
}
.item3 {
grid-row-end: 1;
border: 2px solid red;
}
The following example sets grid-row-start: 1; grid-row-end: 4;.
Example
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
}
.item3 {
grid-row-start: 1;
grid-row-end: 4;
border: 2px solid red;
}