CSS grid-row-gapProperty


Example

Set the row gap to 50px:

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

Try it Yourself »

Browser Support

The numbers in the table indicate the first browser version number that supports the property.

Property
grid-row-gap 57 16 52 10 44

Property definition and usage instructions

The grid-row-gap property is used to set the gap between grid rows.

Note:In CSS3, grid-row-gap has been renamed to row-gap.

Default Value: 0 0
Inherited: no
animation: Supported.Read Aboutanimatable Try it Yourself
version: CSS Grid Layout Module Level 1
JavaScript Syntax: object.style.gridRowGap="50px" Try it Yourself


Syntax

grid-row-gap: length;

Value Description
length Use custom values to set the gap size, which can be set to pixel values px or percentages %. The default value is 0.Read about length units

Related Articles

CSS Tutorial:CSS Grid Layout

CSS Reference Manual:grid-gapProperty

CSS Reference Manual:grid-column-gapProperty

other extensions