Skip to content
Tutorials Center
My learning

Topics

CSS Reference ยท Grid

The grid-row-start property

Reference for the CSS grid-row-start property: choose the horizontal grid line where an item begins, using numbers, names or span, with a live example.

The grid-row-start property decides which horizontal grid line a grid item starts on. Row lines are counted from 1 at the top of the explicit grid. Paired with grid-row-end it fixes the rows an item covers; the shorthand grid-row sets both.

CSS
.hero {
  grid-row-start: 2;
}

Try it

Dropping an item to row 3

Syntax

CSS
grid-row-start: auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ];
  • Initial value: auto
  • Applies to: grid items and absolutely positioned boxes whose containing block is a grid container
  • Inherited: no
  • Animatable: no
  • Computed value: as specified

Values

Value Description
auto No explicit start. The item is auto-placed and spans one row by default.
<integer> Start on that line number; negative values count from the bottom line of the explicit grid.
<custom-ident> Start on the first line with that name (an area name maps to name-start).
<integer> <custom-ident> Start on the nth line with that name.
span <integer> Cover that many rows; used with a set end line.

Usage notes

  • Row lines count one more than rows. Three rows have four lines.
  • Implicit rows are created when you start an item beyond the last explicit row. Their height comes from grid-auto-rows.
  • Auto-placement and explicit rows. Items with a set row but no column are placed first, in the order of the document, and the rest flow around them.
  • Leaves gaps? Skipped rows stay empty. Use grid-auto-flow: dense to backfill when only some items are placed explicitly.
  • Document order still rules focus. Moving items visually with row numbers does not move them for keyboard or screen reader users.

Browser support

Supported in all current browsers.