CSS grid-row Property
Description
The grid-row property controls an item’s placement along the grid’s row axis: it determines which horizontal grid lines the item starts and ends on so the item can occupy a single row track or span multiple tracks. As a shorthand it sets both the start and end positions in one declaration, allowing concise vertical placement while preserving the ability to express complex spans or named-line placement. Because it targets the vertical extent of the grid area, it directly affects the size of the item’s occupied grid area without changing the sizing rules of the tracks themselves.
In practice, grid-row interacts with the grid’s track definitions and implicit track generation. The item’s start and end positions are interpreted in the context of the explicit row tracks defined by grid-template-rows and any implicit tracks created when placement refers outside the explicit grid. Placement also ties into the grid container’s placement algorithm; when explicit line numbers or names aren’t given, the container’s auto-placement behavior controlled by grid-auto-flow can determine the final row in which the item lands.
Positioning via grid-row is commonly used alongside other placement and alignment tools. Vertical span produced by row placement does not override how the content is aligned within the resulting area — alignment is handled by properties such as align-self and horizontal alignment by justify-self. The meaning of “row” can be affected by the document’s writing direction and orientation (for example, by writing-mode), so consider writing-mode when combining logical placement with physical row/column thinking. For compound placement, grid-row is often used together with the horizontal counterpart grid-column or with named regions via grid-area to create fully defined grid areas.
Definition
- Initial value
- See individual properties
- Applies to
- Grid Items
- Inherited
- No
- Computed value
- See individual properties
- Animatable
- No
- JavaScript syntax
- object.style.gridRow
Interactive Demo
Syntax
grid-row: rid-row-start | grid-row-end
Values
- grid-row-startSpecifies on which row to start displaying the item.
- grid-row-endSpecifies on which row-line to stop displaying the item, or how many rows to span.
Example
Browser Support
The following information will show you the current browser support for the CSS grid-row property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
