CSS grid-column-end Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The grid-column-end property sets a grid item’s ending column edge. You can use a line number, a named line, or span to stretch from the start edge.

It is a longhand of grid-column (with grid-column-start). Set it on the item, not the container. It is not inherited. The initial value is auto (default span of 1).

Standard-track.

Not deprecated and not experimental. Baseline Widely available since 2017. Part of modern CSS Grid Layout.

CSS Syntax

syntax.css
grid-column-end: <grid-line> | initial | inherit;

A grid line can be auto, a number such as 3, -1, a name, or span 2.

Property Values

ValueDescriptionTry it
<integer>End at that column line, such as 3Try it
spanEnd n tracks from the start, such as span 2Try it
Negative lineCount from the end, such as -1 for the last lineTry it
autoDefault. Auto-placement or span of 1Try it
initialResets to autoTry it
inheritTakes the parent’s grid-column-endTry it

Line 0 is invalid. On a 3-column grid, positive end lines run 1–4.

How to Use grid-column-end

Define columns on the container, then set where the item’s columns stop.

  1. Set display: grid and grid-template-columns on the container.
  2. Optionally set grid-column-start on the item.
  3. Set grid-column-end to a line number, -1, or span n.
  4. Use the shorthand grid-column when you set start and end together.
PieceRequired?Role
Grid containerYesdisplay: grid on the parent
Column tracksYesUsually from grid-template-columns
grid-column-end on the itemYesChooses the ending column edge

Live Preview

A three-column grid. The item starts at column line 1. Only grid-column-end changes.

grid-column-start: 1 is fixed. Watch how far the purple item reaches.

Sample
Item
A
B
C

grid-column-end: 3

CSS Examples

Each snippet focuses on grid-column-end. Use Try It Yourself for a live editor.

Example 1 — End at a Line

Start at line 1 and stop at line 3 (two columns).

CSS
<style>
  section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .box {
    grid-column-start: 1;
    grid-column-end: 3;
  }
</style>

<section>
  <div class="box">Wide</div>
  <div>2</div>
  <div>3</div>
</section>
Try It Yourself

How It Works

  1. Make three columns. Column lines are 1, 2, 3, and 4.
  2. Pin the start. grid-column-start: 1 begins at the left edge.
  3. Set the end. grid-column-end: 3 stops at line 3.
  4. Count tracks. From line 1 to line 3 covers two columns.

Example 2 — Span from the Start

Let the end edge sit two tracks past the start.

CSS
<style>
  section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .box {
    grid-column-end: span 2;
  }
</style>

<section>
  <div class="box">Span</div>
  <div>2</div>
  <div>3</div>
</section>
Try It Yourself

How It Works

  1. Leave the start auto. The item begins at the next free cell.
  2. Span two tracks. span 2 places the end edge two columns later.
  3. Same visual as lines. From start line 1, this matches ending at line 3.
  4. Shorthand option. grid-column: span 2 does the same job in one property.

Example 3 — End at the Last Line

Use -1 to reach the final column line of the explicit grid.

CSS
<style>
  section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .box {
    grid-column-start: 1;
    grid-column-end: -1;
  }
</style>

<section>
  <div class="box">Full</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
</section>
Try It Yourself

How It Works

  1. Start at the first line. grid-column-start: 1 pins the left edge.
  2. End at the last line. -1 is the final column line of the explicit grid.
  3. Cover every column. On three columns, that spans the full width.
  4. Same as shorthand. grid-column: 1 / -1 writes both edges at once.

Edge Cases & Pitfalls

If the width looks wrong, check the start line and how you count.

target

Set it on the item, not the container

grid-column-end places children. The container defines tracks with grid-template-columns.

lines

End line is after the last track you want

To cover columns 1 and 2, end at line 3, not 2. Lines sit between tracks.

start

End alone still needs a start

If start is auto, the browser picks a start and applies your end or span from there.

zero

Line 0 is invalid

Use positive lines from the start, or negative lines from the end. Never 0.

short

Prefer grid-column for both edges

When you set start and end together, grid-column: 1 / 3 is clearer than two longhands.

Browser Support

grid-column-end is a browser CSS property for Grid item placement. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

grid-column-end

Supported in Chrome 57+, Firefox 52+, Safari 10.1+, and Edge 16+. Internet Explorer does not support the modern property.

97% Global support
Google Chrome 57+
Full support
Mozilla Firefox 52+
Full support
Apple Safari 10.1+
Full support
Microsoft Edge 16+
Full support
Opera 44+
Full support
Samsung Internet 6.2+
Full support
Internet Explorer No modern Grid
Not supported
grid-column-end Widely supported

Bottom line: Safe in current browsers. Use a line number, span, or -1 for the last line; prefer grid-column when setting both edges.

Key Takeaways

  • Role: set where a grid item’s columns stop.
  • Longhand of grid-column, with grid-column-start.
  • Initial: auto. Not inherited.
  • Tip: -1 is the last column line of the explicit grid.

One line: grid-column-end chooses the right edge of an item’s column range.

Frequently Asked Questions

It sets the column line where a grid item stops, or how many columns it spans from its start edge.
The initial value is auto, which usually means a default span of 1 from the start line.
grid-column-end sets only the ending edge. grid-column is the shorthand for both grid-column-start and grid-column-end.
The item’s end edge is two column tracks away from its start edge, so it covers two columns.
Yes. Negative numbers count from the end of the explicit grid. For example, -1 is the last column line.
It is Baseline Widely available: Chrome 57+, Firefox 52+, Safari 10.1+, and Edge 16+. Internet Explorer does not support the modern property. It is a browser CSS property, not a Node.js feature.

Next: grid-column-gap

Legacy alias for column gutters between tracks.

grid-column-gap tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful