CSS grid-column-end Property
Description
The grid-column-end CSS property defines the grid line where a grid item ends on the column (inline) axis. It determines the far edge of the item’s placement within the grid’s column tracks, and together with its starting line it establishes the number of columns the item spans and its final positioning. When the end line is explicitly set, the browser resolves that line relative to the grid’s defined column lines and any named lines, and uses that resolution to place the item within the overall grid structure. Because it targets the end edge, it is conceptually the counterpart to the property that controls the item’s start edge; those two are resolved together to compute the item’s occupied track area.
Placement behavior for grid-column-end interacts closely with the item’s start specification and with shorthand placement. For author convenience you can use the corresponding start property — grid-column-start — or the combined shorthand — grid-column — to express the same intent in a single declaration. When only one of start or end is explicitly provided, the UA will compute the missing edge based on auto-placement rules, any explicit spans, and the grid’s writing direction; if neither is provided the item may be placed by the auto-placement algorithm instead of by a fixed pair of lines.
The value chosen for the end edge also affects the grid’s track generation and overlap behavior. Placing an end line past the explicit grid can create implicit tracks, expanding the grid to accommodate the item; conversely, placing multiple items so their resolved start/end lines overlap will cause them to stack within the same grid area unless other layout or z-index rules separate them. This interaction is influenced by how the grid’s columns are declared — for example the template that defines columns — grid-template-columns — and by the auto-placement direction and packing rules controlled by the auto-placement property — grid-auto-flow. For symmetry and analogous behavior along the block axis, there is an equivalent property for rows — grid-row-end — which behaves the same way but targets the row axis instead.
Definition
- Initial value
- auto
- Applies to
- Grid items and absolutely-positioned boxes whose containing block is a grid container
- Inherited
- No
- Computed value
- As specified
- Animatable
- Yes
- JavaScript syntax
- object.style.gridColumnEnd
Interactive Demo
Syntax
grid-column-end: auto | line | line-name | span line
Values
- autoA keyword indicating that the property does not affect the placement of the element in the grid layout (automatic placement, automatic range, or default range of 1). This is the default value.
- lineAn integer that corresponds to the end face of an element in the grid layout (the counting of faces in the layout is carried out from left to right from the left edge of the element, a schematic display at the top of the page). If a negative integer is specified, then the count is in the reverse order, starting from the end edge of the explicit layout grid. A value of 0 is not valid.
- line-nameA string value that refers to a named column in a grid layout. The element is located to the initial face of the specified element.
- span lineThe span keyword with an integer that determines how many columns the grid element will span. If an integer is omitted, the default value is 1. A negative value or a value of 0 is not valid.
Example
Browser Support
The following information will show you the current browser support for the CSS grid-column-end property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
