The column-width property sets the ideal width of columns in a multi-column layout. The browser fits as many columns as it can without normally making them narrower than that preferred size.
Use a length such as 12rem or 18ch, or auto (the initial value). It is not inherited. You can also set it through the columns shorthand. Pair it with column-gap for spacing. Unlike column-count, it favors readable line length and lets the column count change with container size.
Baseline widely available.
Not deprecated. Lengths and auto are safe in modern browsers. The value must be strictly positive — 0, negatives, and percentages are invalid.
Syntax
CSS Syntax
syntax.css
column-width:auto | <length> | initial | inherit;
One keyword or a positive length. Examples: auto, 120px, 12rem, 18ch.
Values
Property Values
Value
Description
Try it
auto
Browser chooses width from other properties such as column-count. Initial value
Use column-count as well if you need a hard maximum number of columns.
Piece
Required?
Role
Ideal width
Yes (for this property)
Positive length, or auto
Column count
Optional
Browser picks count from available space unless you set column-count
Gap / rule
Optional
Space and dividers between columns
Exact pixel match
Not guaranteed
Ideal width may stretch or shrink to fit the box
Try it
Live Preview
Only column-width changes. Resize the page to see columns appear or disappear.
With auto alone (no count), you usually get one column. A length lets the browser add columns as space allows.
Multi-column text
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-width: 12rem
Code
CSS Examples
Each snippet focuses on column-width. Extra rules are only there so the columns can show. Use Try It Yourself for a live editor.
Example 1 — Ideal Pixel Width
Ask for columns about 120px wide; the browser picks how many fit.
CSS
<style>
article {
column-width: 120px;
}
</style>
<article>
<p>Text flows into as many columns as fit at about 120px each. Widen the window to see more columns appear.</p>
</article>
Text flows into as many columns as fit at about 120px each. Widen the window to see more columns appear. Extra words help fill several columns on a wide screen.
How It Works
Set an ideal width.column-width: 120px is the lesson — a preferred column size.
Count is flexible. The browser adds columns while each stays near that width.
Not always exact. Columns may grow a little to fill leftover space.
Responsive by design. Narrower viewports show fewer columns automatically.
Example 2 — auto with column-count
Use auto width when a fixed count should drive the layout.
CSS
<style>
article {
column-count: 3;
column-width: auto;
}
</style>
<article>
<p>Three fixed columns. Width is auto, so each column shares the available space.</p>
</article>
Three fixed columns. Width is auto, so each column shares the available space. More sample text keeps the columns filled for study.
How It Works
Fix the count.column-count: 3 creates three columns.
Leave width automatic.column-width: auto (the default) lets count decide sizing.
Columns share the box. Each column grows or shrinks with the container.
When to use this. Prefer auto when you care about column count more than line length.
Example 3 — Readable ch Width
Size columns by character measure for comfortable reading.
CSS
<style>
article {
column-width: 18ch;
}
</style>
<article>
<p>About eighteen characters per column. The browser adds more columns when the box is wide enough.</p>
</article>
About eighteen characters per column. The browser adds more columns when the box is wide enough. Extra sample text shows the multi-column flow clearly.
How It Works
Use a character unit.18ch targets roughly eighteen “0” widths in the current font.
Readable measure. Short columns stay easier to scan than very wide ones.
Still an ideal. Actual width can adjust to fill the container.
Great for articles. Pair with column-gap when you want newspaper-style prose.
Edge Cases & Pitfalls
If columns look wrong, one of these is usually why.
ideal
Width is preferred, not exact
Columns may stretch wider to fill leftover space, or shrink if the container is narrower than your value.
%
Percentages are invalid
column-width: 50% is dropped. Use a length such as px, em, rem, or ch.
zero
Zero and negatives are invalid
The length must be strictly positive. 0 or -10px will not create columns.
count
column-count can limit the result
With both properties set, the browser respects the count limit while still aiming for your width. Use one or both deliberately — or the columns shorthand.
auto
auto alone is often one column
Without column-count, column-width: auto typically stays a single column. Set a length when you want automatic multi-column flow.
Compatibility
Browser Support
column-width is a browser CSS property for multi-column layout. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
column-width
Supported in all modern browsers for auto and length values. Available across browsers since November 2016 (Baseline).
100%auto and lengths
Google ChromeAll versions
Full support
Mozilla FirefoxAll versions
Full support
Apple SafariAll versions
Full support
Microsoft EdgeAll versions
Full support
OperaAll versions
Full support
Samsung InternetAll versions
Full support
Internet Explorer10+
Full support
column-widthWidely supported
Bottom line: Safe everywhere for auto and positive lengths. Avoid percentages and zero. It is not a runtime API.
Remember
Key Takeaways
Role: set the preferred width of multi-column text columns.
Initial value:auto. Not inherited.
Responsive: more space usually means more columns at your ideal width.
vs count: use width for line length; use column-count to fix how many columns.
One line:column-width asks for a comfortable column size — the browser decides how many columns fit.
Frequently Asked Questions
It sets the ideal width of columns in a multi-column layout. The browser creates as many columns as fit without normally going below that preferred width.
The initial value is auto. Column width is then driven by other properties such as column-count.
column-width prefers a readable column size and lets the count flex. column-count fixes how many columns exist. You can combine both; column-count can limit the maximum number.
No. Percentage values are invalid. Use a length such as px, em, rem, or ch, or use auto.
No. It is an ideal width. Columns may grow wider to fill leftover space, or shrink if the container is narrower than the value.
It is Baseline and widely available in modern browsers. It is a browser CSS property, not a Node.js feature.