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

CSS row-gap property

CSS row-gap property

Example

Set the gap between grid rows to 50 pixels:

div

{

display:

grid

;

row-gap:

50

px

;

}

Try it »


Browser support

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

property
row-gap (in grid) 66 16 61 12.1 53
row-gap (in flexbox) 84 84 63 Not supported 70

Property definition and usage

The row-gap property specifies the size of the gap between rows.

Note: CSS grid layout was originally defined with the grid-row-gap property, which is now gradually being replaced by row-gap.

Default value: normal
Inherited: no
Version: CSS3
JavaScript syntax: object.style.rowGap ="40px"

Syntax

row-gap: length|normal|initial|inherit;
Value Description
length A specified length that sets the gap between rows
normal Default value. Specifies the normal gap between rows
initial Set this property to its default value. Read about initial
inherit Inherit this property from its parent element. Read about inherit

Related Articles

CSS Tutorial: CSS Grid Layout

CSS Reference Manual: gap property

CSS Reference Manual: column-gap property