CSS grid-row-gap Property

❮ Previous Reference Next ❯

Example

.grid-container {
  display: grid;
  grid-row-gap: 50px;
}





1
2
3
4
5
6
7
8

Meaning

The grid-row-gap property specifies the size of the gap between the rows in a grid layout. And this property was renamed to row-gap in CSS3.

Note: This property was renamed to row-gap in CSS3.

Default value:0
Inherited:No
Animatable:Yes
Version:CSS Grid Layout Module Level 1
JavaScript syntax:
object.style.gridRowGap="length|initial|inherite|revert|revert-layer|unset";



Standard Syntax

grid-row-gap: length|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
length 0 is the default value. Specifies the values in px or %(percentage).
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-gap: 0;
}



Note: grid-row-gap property was renamed to row-gap in CSS3.

Example

.grid-container {
  display: grid;
  column-gap: 50px;
  row-gap: 10px;
}
❮ Previous Reference Next ❯