property

grid-column — CSS reference

Shorthand for grid-column-start and grid-column-end. Selects the item’s inline-axis boundaries. The slash separates lines, not a start and a width. Use span to express a number of tracks. Omitted end normally becomes auto, with special named-area handling for a lone custom identifier.

Formal Syntax & Structure

css syntaxcss
<grid-line> [ / <grid-line> ]?

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>grid-column</title><style>body{margin:0}#g{display:grid;width:300px;grid-template-columns:100px 100px 100px;grid-template-rows:40px 40px;}#g>*{background:#146e73;color:white;box-sizing:border-box}#b{background:#345d8e}#c{background:#79518e}</style><body><div id="g"><div id="a" style="grid-column:2 / 4">A</div></div></body></html>
CSS Reference