Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS grid-row-gap property

CSS grid-row-gap property

Example

Set the row gap to 50px:

.grid-container

{

grid-row-gap:

50

px

;

}

Try it »


Browser support

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

property
grid-row-gap 57 16 52 10 44

Property definition and usage

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
Animatable: support. Read about animatable Try it
Version: CSS Grid Layout Module Level 1
JavaScript syntax: object.style.gridRowGap="50px" Try it

Syntax

grid-row-gap: length;

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

Related Articles

CSS Tutorial: CSS Grid Layout

CSS Reference Manual: grid-gap property

CSS Reference Manual: grid-column-gap property