The row-gap property sets the size of the gutter between rows. It works on grid, flex, and multi-column containers.
It is the longhand for the row half of gap. Pair it with column-gap when you want different horizontal spacing. The property is not inherited. The initial value is normal (0 in grid and flex; 1em in multi-column).
Standard-track · Baseline Widely available.
Not experimental. Prefer row-gap over the older alias grid-row-gap (still supported as an alias).
Wrap the items. A narrow width plus flex-wrap: wrap creates two flex lines.
Space the lines.row-gap: 16px sits between the wrapped rows.
Space side by side.column-gap: 8px spaces items on the same line.
Same idea as grid. Gutters only appear between lines, not outside them.
Edge Cases & Pitfalls
If the vertical space looks wrong, one of these is usually why.
single
One row shows nothing
With a single row of items, there is no place for a row gutter. Add tracks, wrap, or use a column flex.
normal
normal is not always zero
In grid and flex, normal is 0. In multi-column, it is 1em.
negative
Negative values are invalid
Browsers ignore a negative row-gap. Use 0 or a positive length.
margin
Do not mix with item margins for the same job
Margins plus row-gap can double the space. Prefer gap on the container for even gutters.
alias
grid-row-gap is the old name
It still works as an alias. New styles should use row-gap (works beyond grid).
Compatibility
Browser Support
row-gap is a browser CSS property for layout gutters. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
row-gap
Grid support since about 2017. Flex row-gap since Chrome 84, Firefox 63, Safari 14.1, and Edge 84. Internet Explorer does not support it.
97%Global support
Google Chrome66+ grid · 84+ flex
Full support
Mozilla Firefox61+ grid · 63+ flex
Full support
Apple Safari12+ grid · 14.1+ flex
Full support
Microsoft Edge16+ grid · 84+ flex
Full support
Opera53+ grid · flex in Chromium 84+
Full support
Samsung Internet9.2+
Full support
Internet ExplorerNo
Not supported
row-gapWidely supported
Bottom line: Safe for modern grid and flex. Prefer row-gap over grid-row-gap. This is not a JavaScript runtime API.
Remember
Key Takeaways
Role: set the gutter between rows in grid, flex, and multi-column layouts.
Longhand of gap: use it when only the vertical spacing should change.
Initial:normal — 0 in grid/flex, 1em in multi-column.
Between only: never adds space before the first or after the last row.
One line:row-gap is the clean way to space rows without margin tricks on every child.
Frequently Asked Questions
It sets the size of the gutter between rows in grid, flex, and multi-column layouts. Space appears only between rows, not before the first or after the last.
row-gap controls only the vertical (row) gutter. gap is the shorthand that can set both row-gap and column-gap.
The initial value is normal. That means 0 in grid and flex, and 1em in multi-column layout.
Yes. It spaces stacked flex items in a column, or spaces wrapped flex lines when flex-wrap creates more than one row.
grid-row-gap is an older alias for row-gap. Prefer row-gap in new CSS. Browsers still recognize the old name.
It is Baseline Widely available. Grid support is older (Chrome 66+, Firefox 61+, Safari 12+, Edge 16+). Flex support is later (Chrome 84+, Firefox 63+, Safari 14.1+, Edge 84+). Internet Explorer does not support it.