Count from the end.-1 is the last line of the explicit grid.
Fill the height. Start at 1 and end at -1 covers every defined row.
Useful pattern. Stay correct even if you later add more rows.
Remember:0 is invalid; use 1 or a negative integer.
Edge Cases & Pitfalls
If placement looks wrong, check these first.
lines
Lines ≠ rows
Three rows create four lines. grid-row-end: 3 stops at the third line, not “row index 3” in every mental model.
zero
Line 0 is invalid
Use 1 or higher, or a negative integer from the end. Zero is discarded.
shorthand
grid-row can overwrite end
Writing grid-row after grid-row-end replaces both edges. Put the longhand last, or include the end in the shorthand.
container
Only works on grid items
The parent must be a grid (or the item absolutely positioned against a grid). On a block parent, the property has no effect.
overlap
Items can share cells
Explicit placement can stack items in the same area. That is allowed — use it on purpose, or adjust lines to avoid surprise overlaps.
Compatibility
Browser Support
grid-row-end is a browser CSS property for Grid item placement. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
grid-row-end
Chrome 57+, Edge 16+, Firefox 52+, Safari 10.1+. Internet Explorer needs older -ms- Grid syntax.
97%Modern browser support
Google Chrome57+
Full support
Mozilla Firefox52+
Full support
Apple Safari10.1+
Full support
Microsoft Edge16+
Full support
Opera44+
Full support
Samsung Internet6+
Full support
Internet ExplorerNo (use -ms- Grid)
Not supported
grid-row-endWidely supported
Bottom line: Safe for modern Grid layouts. Prefer standard Grid over legacy -ms- prefixes except when you must support Internet Explorer. It is not a runtime API.
Remember
Key Takeaways
Role: set the ending row line (or span) of a grid item.
Lines vs tracks: n rows → n+1 lines; -1 is the last line.
Shorthand:grid-row sets start and end together.
Initial value:auto. Not inherited.
One line:grid-row-end: 3; (with a start) parks the item’s bottom edge on row line 3.
Frequently Asked Questions
It sets where a grid item ends vertically by choosing a row line, a span, or auto-placement.
The initial value is auto. The item usually spans one row from its start line.
The item’s bottom edge sits on row line 3 — the bottom edge of the second row track in a top-to-bottom grid.
grid-row-end: span 2 makes the end edge two row lines after the start edge, so the item spans two rows when the start is fixed or auto.
grid-row-end sets only the end. grid-row is the shorthand for both grid-row-start and grid-row-end.
It is Baseline Widely available. Chrome 57+, Edge 16+, Firefox 52+, Safari 10.1+, and modern Opera support it. Internet Explorer needs the older -ms- prefixed Grid. It is a browser CSS property, not a Node.js feature.