CSS row-gapProperty


Example

Specify the interval between grid rows as 50 pixels:

div { display: grid; row-gap: 50px; }

Try it Yourself »

Browser Support

The number in the table indicates the first browser version number 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 definitions and usage instructions

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

Note:CSS grid layout was initially defined using the grid-row-gap property, which is currently being gradually 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 will set 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:gapProperty

CSS Reference Manual:column-gapProperty

other extensions