grid-row
W3C CSS Snapshot 2026
Choose where an item starts and ends along the rows. This shorthand sets grid-row-start and grid-row-end.
On this page
Syntax and values
| Value or syntax | What it does |
|---|---|
auto | Uses automatic placement or the default span for that edge. |
1 / 3 | Starts at line 1 and ends at line 3, covering two tracks. |
2 / -1 | Starts at line 2 and ends at the last line of the explicit grid. |
1 / span 2 | Starts at line 1 and spans two tracks. |
content-start / content-end | Uses named lines defined in the track list. |
Try the example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>grid-row example</title>
<style>
.layout { display: grid; width: min(100%, 320px); border: 2px solid teal; box-sizing: border-box; }
.layout > div { padding: 8px 12px; background: #def5f5; color: #123; border: 1px solid #81b9b5; box-sizing: border-box; }
.layout { grid-template-columns: 1fr 1fr; grid-template-rows: 60px 60px; }
.layout .first { grid-row: 1 / 3; }
</style>
</head>
<body>
<div class="layout">
<div class="first">A</div>
<div class="second">B</div>
<div>C</div>
</div>
</body>
</html>
What to expect A spans both rows on the left. B and C stay in the right column.