The grid-column-end property sets where a grid item stops on the column axis, controlling how many columns it spans.
01
End line
Stop column.
02
auto
Default end.
03
span 3
Column count.
04
Line #
Exact stop.
05
With start
Pair lines.
06
Grid item
Child element.
Fundamentals
Introduction
The grid-column-end property in CSS is used in grid layouts to determine where a grid item ends on the column axis. It specifies the line where the item should stop, allowing for flexible and complex grid designs.
This property is crucial for placing and spanning elements across multiple columns in a grid container.
Definition and Usage
Apply grid-column-end on a child of a grid container. Use it alone with span n to stretch an item across multiple columns from its auto-placed start. Pair it with grid-column-start when you need both the starting and ending column lines defined separately.
💡
Beginner Tip
grid-column-end: span 3 means the item covers three column tracks. You can also use a line number like grid-column-end: 4 to stop at column line 4.
Foundation
📝 Syntax
The syntax for the grid-column-end property is straightforward. It can be applied to any grid item within a grid container:
From its auto-placed starting column, item 2 extends across three column tracks because grid-column-end: span 3 sets the ending position three columns later.
-1 refers to the last column line. Combined with grid-column-start: 2, the item fills from column 2 through the final column.
A11y
♿ Accessibility
Keep DOM order meaningful when spanning changes visual reading flow.
Do not rely on column span alone to convey relationships; use headings and labels.
Test keyboard tab order when wide items reorder the visual layout.
Use semantic elements such as <main> alongside grid placement.
Verify content remains readable when items span many columns on small screens.
🧠 How grid-column-end Works
1
Item gets a start position
Auto-placement or grid-column-start sets where the item begins.
Start
2
grid-column-end is set
You define the ending line or span with span n or a line number.
End
3
Browser spans columns
The item stretches horizontally from start to end across column tracks.
Span
=
▦
Controlled column width
The item covers exactly the columns defined by its ending line.
Compatibility
🖥 Browser Compatibility
The grid-column-end property is supported in all modern browsers, including recent versions of Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
grid-column-end everywhere
Column 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-column-end property97% supported
Bottom line: Safe for modern projects. Test spanning layouts across browsers for consistent rendering.
Wrap Up
🎉 Conclusion
The grid-column-end property is an essential part of CSS Grid Layout, allowing developers to control the placement and span of grid items on the column axis. By mastering this property, you can create flexible and sophisticated grid-based designs.
Experiment with different values and combinations to see how this property can enhance your layout designs. Start with span, then pair with grid-column-start for precise boundaries.