grid-column-end specifies where the selected grid item should end (or span) along the grid container’s row (inline) axis.
The grid-column-end
property accepts the following values:
auto
<column-line-number>
span <number-of-columns>
Example 1: How to Auto-End the Selected Grid Item Following the Normal Column Flow
Try Editing It
The snippet above used the auto
value to auto-end grid-item1
according to the normal layout flow.
Example 2: How to End the Selected Grid Item at Column Line 3
Try Editing It
The snippet above used the grid-column-end
property to end grid-item1 at column line 3
.
CodeSweetly adsLearn CSS Grid with Images
Use beautiful images to learn CSS Grid.
Find out more
Example 3: How to Span the Selected Grid Item across Two Columns
Try Editing It
The snippet above used the span 2
value to span grid-item1
across two columns.