The grid-row-end property sets where a grid item stops on the row axis, controlling how many rows it spans vertically.
01
End line
Stop row.
02
auto
Default end.
03
span 2
Row count.
04
Line #
Exact stop.
05
With start
Pair lines.
06
Grid item
Child element.
Fundamentals
Introduction
The grid-row-end property in CSS is used in the Grid Layout to define the ending position of a grid item within the grid’s rows. This property allows you to span grid items over multiple rows, helping you create more complex and flexible layouts.
Definition and Usage
Apply grid-row-end on a child of a grid container. Use it alone with span n to stretch an item across multiple rows from its auto-placed start. Pair it with grid-row-start when you need both the starting and ending row lines defined separately.
💡
Beginner Tip
grid-row-end: span 2 means the item covers two row tracks. You can also use a line number like grid-row-end: 3 to stop at row line 3.
Foundation
📝 Syntax
The syntax for the grid-row-end property is straightforward. You can specify the row line where the grid item should end or the number of rows it should span:
-1 refers to the last row line. Combined with grid-row-start: 1, the sidebar fills from top to bottom.
A11y
♿ Accessibility
Keep DOM order meaningful when row spanning changes visual reading flow.
Do not rely on row position alone to convey meaning; use headings and labels.
Test keyboard tab order when tall items reorder the visual layout.
Use semantic HTML such as <nav> and <main> alongside grid placement.
Verify content remains readable when items span many rows on small screens.
🧠 How grid-row-end Works
1
Item gets a start position
Auto-placement or grid-row-start sets where the item begins.
Start
2
grid-row-end is set
You define the ending line or span with span n or a line number.
End
3
Browser spans rows
The item stretches vertically from start to end across row tracks.
Span
=
▦
Controlled row height
The item covers exactly the rows defined by its ending line.
Compatibility
🖥 Browser Compatibility
The grid-row-end property is widely supported in modern browsers, including recent versions of Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
grid-row-end everywhere
Row end placement works in all major modern grid implementations.
97%Modern browser support
Google Chrome57+ · Desktop & Mobile
Full support
Mozilla Firefox52+ · Desktop & Mobile
Full support
Apple Safari10.1+ · macOS & iOS
Full support
Microsoft Edge16+ · 79+ Chromium
Full support
Opera44+
Full support
grid-row-end property97% supported
Bottom line: Safe for modern projects. Pair with grid-row-start or use grid-row shorthand.
Wrap Up
🎉 Conclusion
The grid-row-end property is a powerful feature of CSS Grid Layout that allows you to control the ending position of grid items within rows. By using this property, you can create more flexible and dynamic layouts.
Experiment with different values to see how you can leverage the grid-row-end property to enhance your web designs. Start with span, then pair with grid-row-start for precise boundaries.