CSS grid-column Property
Shorthand for grid-column-start and grid-column-end specifying a grid item's column placement
Syntax
grid-column: <start> / <end>;Values
| Value | Description |
|---|---|
| auto | Automatic placement |
| 1 / 3 | Spans from column line 1 to 3 |
| 1 / -1 | Spans the entire row |
| span 2 | Spans 2 columns from auto position |
Example
.full-width {
grid-column: 1 / -1;
}Understanding CSS grid-column
The CSS grid-column property shorthand for grid-column-start and grid-column-end specifying a grid item's column placement. As part of the Grid module in CSS, it is one of the most commonly used properties for controlling the visual presentation of web pages.
You can set grid-column to values such as auto, 1 / 3, 1 / -1, span 2, among others. Each value changes how the browser renders the affected element, giving you fine-grained control over your page layout and design. Choosing the right value depends on the specific design requirements of your project.
Common use cases for the grid-column property include responsive web design, component-based layouts, and creating visually consistent interfaces across devices. It works closely with related properties like grid-column-start, grid-column-end, grid-row to achieve complex styling effects. Understanding how these properties interact helps you write cleaner, more maintainable stylesheets.
Browser support for grid-column is excellent across all modern browsers including Chrome, Firefox, Safari, and Edge. For older browsers, consider using fallback values or progressive enhancement strategies. The property can also be set dynamically via JavaScript using element.style.gridColumn or the CSS custom properties (variables) approach for theming.
Related Properties
grid-column-startSpecifies on which column line a grid item starts
grid-column-endSpecifies on which column line a grid item ends
grid-rowShorthand for grid-row-start and grid-row-end specifying a grid item's row placement
grid-areaSpecifies a grid item's size and location by referencing named areas or line numbers
Explore More CSS Properties
Browse our complete reference of 251 CSS properties with syntax, examples, and tips.