![]() |
VOOZH | about |
The CSS grid-column-end property specifies the ending position of a grid item within a grid layout. The grid-column-end property defines how many columns an item will span, or on which column line the item will end, allowing precise placement within the grid structure.
grid-column-end: auto |span n | column-line;Property Value | Description |
|---|---|
auto | The grid items will span in one column. It is the default value. |
span n | It is used to specify the number of column items that will span. |
column-line | It is used to specify on which column to end the display of the item, the user can set the end of the column. |
In this example, we create a CSS grid container with three columns, a green background, and evenly spaced white boxes containing numbers, centered within the grid cells using the display: grid property.
Output:
In this example, we creates a CSS grid container with three columns. The first item spans all three columns, and the remaining items fill individual cells. The grid has a green background and white boxes.
Output:
In this example, we creates a CSS grid container with three columns. The first item spans two columns, and the remaining items fill individual cells. The grid has a green background and white boxes.
Output:
Supported Browsers: The browser supported by grid-column-end property are listed below: