CSS grid-row Property
Shorthand for grid-row-start and grid-row-end specifying a grid item's row placement
Syntax
grid-row: <start> / <end>;Values
| Value | Description |
|---|---|
| auto | Automatic placement |
| 1 / 3 | Spans from row line 1 to 3 |
| span 2 | Spans 2 rows |
Example
.tall-card {
grid-row: span 2;
}Understanding CSS grid-row
The CSS grid-row property shorthand for grid-row-start and grid-row-end specifying a grid item's row placement. As part of the Grid module in CSS, it is one of the most commonly used properties for controlling the visual presentation of web pages.
You can set grid-row to values such as auto, 1 / 3, span 2, among others. Each value changes how the browser renders the affected element, giving you fine-grained control over your page layout and design. Choosing the right value depends on the specific design requirements of your project.
Common use cases for the grid-row property include responsive web design, component-based layouts, and creating visually consistent interfaces across devices. It works closely with related properties like grid-row-start, grid-row-end, grid-column to achieve complex styling effects. Understanding how these properties interact helps you write cleaner, more maintainable stylesheets.
Browser support for grid-row is excellent across all modern browsers including Chrome, Firefox, Safari, and Edge. For older browsers, consider using fallback values or progressive enhancement strategies. The property can also be set dynamically via JavaScript using element.style.gridRow or the CSS custom properties (variables) approach for theming.
Related Properties
grid-row-startSpecifies on which row line a grid item starts
grid-row-endSpecifies on which row line a grid item ends
grid-columnShorthand for grid-column-start and grid-column-end specifying a grid item's column placement
grid-areaSpecifies a grid item's size and location by referencing named areas or line numbers
Explore More CSS Properties
Browse our complete reference of 251 CSS properties with syntax, examples, and tips.