CSS column-gap Property

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

Definition and Usage

The column-gap property sets the size of the gutter between an element's columns. It works in multi-column layout, CSS Grid, and Flexbox. Negative values are invalid.

The initial value is normal: about 1em in multi-column layout, and 0 in Grid and Flexbox. Pair it with column-count or columns for newspaper-style text, or use it on a grid/flex container for track spacing. The gap shorthand can set row-gap and column-gap together.

Standard-track.

Not deprecated and not experimental. Older grid-column-gap is now an alias—prefer column-gap or gap in new code.

CSS Syntax

syntax.css
column-gap: normal | <length-percentage> | initial | inherit;

Use a non-negative length (px, em, rem) or a percentage of the container's inline size. Some newer engines also accept thin, medium, and thick; stick to lengths for widest support.

Property Values

ValueDescriptionTry it
normalDefault. ~1em in multi-column; 0 in Grid/FlexboxTry it
<length>Fixed gutter, for example 20px or 2remTry it
<percentage>Relative to the container's content-box inline sizeTry it
0No gutter between columnsTry it
initialResets to normalTry it
inheritTakes the parent's column-gap (not inherited by default)Try it

How to Use column-gap

Create columns first, then set how much space sits between them.

  1. Enable columns with column-count, column-width, or columns—or use a Grid/Flex container.
  2. Set column-gap to a length, percentage, or leave normal.
  3. Optional: add column-rule to draw a line in the middle of the gutter (it does not change the gap size).
  4. For both row and column gutters in Grid/Flex, prefer the gap shorthand.
PieceRequired?Role
Multicol / Grid / FlexYesWithout columns or tracks, there is no gutter to size
column-gapOptionalDefaults to normal if omitted
column-ruleOptionalVisible divider centered in the gap

Live Preview

Three columns of the same text. Change only the gap. A thin rule marks the center of each gutter.

In multi-column layout, normal is roughly 1em. Percentages use the container width.

Result

London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth.

column-gap: 20px

CSS Examples

Each snippet keeps only what column-gap needs. Use Try It Yourself for a live editor.

Example 1 — Length Gap (20px)

Add a fixed gutter between three text columns.

CSS
<style>
  p {
    column-count: 3;
    column-gap: 20px;
  }
</style>

<p>
  London. Michaelmas term lately over…
</p>
Try It Yourself

How It Works

  1. Create columns. column-count: 3 turns the paragraph into a multicol box.
  2. Set the gutter. column-gap: 20px puts 20 pixels between each column.
  3. Text still flows. Content fills columns as usual; only the space between them changed.
  4. Try other lengths. 1em or 2rem scale with font size instead of a fixed pixel value.

Example 2 — normal (Default)

Rely on the browser default gutter for multi-column text.

CSS
<style>
  p {
    column-count: 3;
    column-gap: normal;
  }
</style>

<p>
  London. Michaelmas term lately over…
</p>
Try It Yourself

How It Works

  1. Use the keyword. column-gap: normal is the initial value.
  2. Multicol meaning. In multi-column layout, normal resolves to about 1em.
  3. Grid/Flex meaning. On Grid and Flexbox, normal means no extra column gap (0).
  4. Omit if you want. Leaving column-gap out has the same effect as writing normal.

Example 3 — Gap Between Grid Columns

The same property spaces columns in a CSS Grid container.

CSS
<style>
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 20px;
  }
</style>

<div class="grid">
  <span>One</span>
  <span>Two</span>
  <span>Three</span>
</div>
Try It Yourself

How It Works

  1. Make a grid. display: grid with three equal columns.
  2. Space only columns. column-gap: 20px adds gutters between columns, not rows.
  3. Same property name. You do not need grid-column-gap anymore—it aliases column-gap.
  4. Need row spacing too? Add row-gap, or set both with gap: 0.5rem 20px.

Edge Cases & Pitfalls

If the gutter looks wrong, check the layout type and whether you meant gap instead.

normal

normal means different things

In multi-column layout it is about 1em. In Grid and Flexbox it is 0. Do not assume one pixel size everywhere.

rule

column-rule does not widen the gap

The rule is painted in the middle of the gutter. A thick rule can look wider than the gap, but it does not change column-gap.

neg

Negative gaps are invalid

Values less than 0 are dropped. Use 0 for no gutter, not a negative length.

alias

Prefer column-gap over grid-column-gap

grid-column-gap still works as an alias, but new code should use column-gap or the gap shorthand.

%

Percentages need a definite inline size

Percentage gaps resolve against the container's content-box width (inline size). If that size is indefinite, the percentage can resolve to 0.

Browser Support

column-gap is a browser layout property. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

column-gap

Multicol: Chrome 50+, Firefox 52+, Safari 9+, Edge 12+. Grid/Flex contexts landed later (Grid ~66/61/12, Flex ~84/63/14.1).

97% modern browsers
Google Chrome 50+ (multicol)
Full support
Mozilla Firefox 52+ (multicol)
Full support
Apple Safari 9+ (multicol)
Full support
Microsoft Edge 12+ (multicol)
Full support
Opera 37+
Full support
Samsung Internet 5.0+
Full support
Internet Explorer 10+ (multicol)
Partial
column-gap Widely supported

Bottom line: Safe for multi-column layouts in modern browsers. For Flexbox gaps, require Chrome 84+, Firefox 63+, Safari 14.1+, Edge 84+.

Key Takeaways

  • Role: sizes the gutter between columns (multicol, Grid, Flex).
  • Default: normal (~1em in multicol; 0 in Grid/Flex).
  • Pair: column-rule draws in the gap; gap sets row + column together.
  • Alias: prefer column-gap over legacy grid-column-gap.

One line: column-gap controls the space between columns; use a length or percentage, or leave normal for the layout’s default gutter.

Frequently Asked Questions

column-gap sets the size of the gutter between columns in multi-column layout, and between columns in CSS Grid and Flexbox. Negative values are invalid.
The initial value is normal. In multi-column layout that computes to about 1em. In Grid and Flexbox, normal means no extra column gap (0).
column-gap sets only the column (inline-axis) gutter. The gap shorthand sets row-gap and column-gap together. Use gap when you want both; use column-gap when only columns need spacing.
No. column-rule draws a line in the middle of the gap. The rule's width does not add to or shrink column-gap.
grid-column-gap is now an alias for column-gap. Prefer column-gap (or gap) in new code.
Multi-column support is in Chrome 50+, Firefox 52+, Safari 9+, and Edge 12+. Grid and Flexbox contexts arrived later. It is a browser layout property, not a Node.js feature.

Next: column-rule

Draw a vertical divider between multi-column tracks.

column-rule 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