CSS column-count Property

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

Definition and Usage

The column-count property breaks an element's content into a fixed number of columns. Content flows down the first column, then continues in the next—like a newspaper or magazine layout.

Use a positive integer such as 2 or 3, or auto when column-width should decide how many columns fit. It applies to block containers (not table wrapper boxes), is not inherited, and the initial value is auto. You can also set it through the columns shorthand.

Standard-track.

Not deprecated and not experimental. Multi-column layout (including column-count) has been widely available across browsers since 2017.

CSS Syntax

syntax.css
column-count: auto | <integer [1,∞]> | initial | inherit;

The integer must be 1 or greater. Zero and negative values are invalid.

Property Values

ValueDescriptionTry it
autoDefault. Column count comes from other properties such as column-widthTry it
<integer>Ideal number of columns (1 or more). With a set column-width, this is the maximumTry it
2Two columnsTry it
3Three columnsTry it
4Four columnsTry it
initialResets to autoTry it
inheritTakes the parent's column-count (the property does not inherit by default)Try it

How to Use column-count

Pick a block of flowing text, set how many columns you want, then tune spacing and rules if needed.

  1. Choose a block container (div, article, section, or p) that holds continuous content.
  2. Set column-count to a positive integer, or use auto with column-width.
  3. Optional: add column-gap for space and column-rule for a divider.
  4. On narrow screens, test readability—many columns can make each column too thin.
PieceRequired?Role
column-countYes (for a fixed count)How many columns to aim for
column-widthOptionalPreferred width; with a count, the count is a max
column-gapOptionalSpace between columns
column-ruleOptionalVertical line between columns

Live Preview

Change the count and watch the same paragraph reflow across columns.

auto uses column-width: 8rem so the browser picks how many columns fit.

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-count: 2

CSS Examples

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

Example 1 — Two Columns

Split one paragraph into two equal columns.

CSS
<style>
  p {
    column-count: 2;
  }
</style>

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

How It Works

  1. One property. column-count: 2 asks the browser for two columns.
  2. Content flows. Text fills the first column, then continues in the second.
  3. Balanced by default. Browsers try to keep column heights similar (see column-fill).
  4. No Grid needed. You did not place separate items—one block of text was reflowed.

Example 2 — Three Columns

Use a higher count for a denser, magazine-style layout.

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

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

How It Works

  1. Raise the count. column-count: 3 targets three columns.
  2. Same content model. Still one flowing element—only the column count changed.
  3. Watch the width. More columns mean each column is narrower in the same container.
  4. Tune later. Add column-gap or column-rule when spacing or dividers help reading.

Example 3 — auto with column-width

Let the browser choose how many columns fit a preferred width.

CSS
<style>
  p {
    column-count: auto;
    column-width: 8rem;
  }
</style>

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

How It Works

  1. Keep count flexible. column-count: auto does not force a fixed number.
  2. Set a preferred width. column-width: 8rem is the size the browser aims for.
  3. Responsive by design. Wider viewports get more columns; narrower ones get fewer.
  4. Both set? If you also set an integer count with a width, the count becomes a maximum.

Edge Cases & Pitfalls

If columns look wrong, check the count, width, and container size first.

auto

auto alone stays one column

With only column-count: auto and no useful column-width, you still get a single column. Pair auto with a width, or set an integer.

max

Count + width means maximum

When both are non-auto, column-count is a ceiling. The browser may use fewer columns if the container is narrow.

thin

Too many columns hurt reading

On small screens, four columns can become unreadably narrow. Prefer fewer columns or auto + column-width for responsive text.

grid

Not a replacement for Grid or Flexbox

Multi-column flows continuous content. For separate cards, toolbars, or form layouts, use Grid or Flexbox instead.

break

Headings can split awkwardly

A heading may land at the bottom of a column. Use break-inside: avoid on elements that should stay together.

Browser Support

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

✓ Baseline · Widely available since 2017

column-count

Chrome 50+, Firefox 52+, Safari 9+, Edge 12+, IE 10+. Older engines used -webkit- or -moz- prefixes.

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

Bottom line: Safe for production. Unprefixed support has been Baseline since March 2017. Very old browsers may need -webkit-column-count / -moz-column-count.

Key Takeaways

  • Role: splits flowing content into N columns (newspaper-style).
  • Values: positive integer, or auto (often with column-width).
  • Pair: column-gap and column-rule for spacing and dividers.
  • Shorthand: columns can set count and width together.

One line: column-count turns one block of text into a multi-column layout; use an integer for a fixed count or auto with column-width for flexible columns.

Frequently Asked Questions

column-count breaks an element's content into a given number of columns. Text flows down one column, then continues in the next, like a newspaper layout.
The initial value is auto. Content stays in one column unless you set a positive integer or pair auto with column-width.
column-width sets a preferred column size. column-count then acts as a maximum. The browser fits as many columns as it can without exceeding that count.
column-count flows one continuous block of content across columns. CSS Grid places separate items into explicit tracks. Prefer multi-column for articles; prefer Grid for cards and UI layouts.
Yes. Use column-gap for space between columns and column-rule for a vertical divider line.
Unprefixed support is in Chrome 50+, Firefox 52+, Safari 9+, Edge 12+, and IE 10+. It is a browser layout property, not a Node.js feature.

Next: column-fill

Control whether columns balance or fill sequentially.

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