CSS column-width Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Layout & Columns

What You’ll Learn

The column-width property sets the ideal width of each column — the browser then fits as many columns as the container allows.

01

Column Width

Target column size.

02

Auto Flow

Browser picks count.

03

Default auto

Browser decides.

04

Length Units

px, em, rem, ch.

05

Responsive

Adapts to space.

06

Readability

Comfortable lines.

Definition and Usage

The column-width CSS property specifies the optimal width of columns in a multi-column layout. It lets you control column width while the browser determines how many columns fit the available space — a flexible way to create responsive, visually appealing layouts.

Unlike column-count, which fixes the number of columns, column-width focuses on readable line length. On a wide screen you may get three or four columns; on a narrow screen the layout may collapse to one or two.

💡
Beginner Tip

A common readable column width for body text is roughly 200px–350px or 30ch–45ch. Pair column-width with column-gap for spacing between columns.

📝 Syntax

The syntax for column-width accepts a length value or auto:

syntax.css
selector {
  column-width: value;
}

Basic Example

column-width-200px.css
.columns {
  column-width: 200px;
}

Here, value can be any valid CSS length unit such as px, em, rem, or ch.

Syntax Rules

  • The initial value is auto — the browser chooses column width.
  • Browser creates as many columns as fit at the specified width.
  • Can be combined with column-count to cap the maximum number of columns.
  • Works with column-gap, column-rule, and column-span.
  • Part of the columns shorthand: columns: 200px 3; (width and count).

⚡ Quick Reference

QuestionAnswer
Initial valueauto
Applies toMulti-column containers
InheritedNo
AnimatableNo
Common useResponsive newspaper-style text columns (~200px–300px)

💎 Property Values

The column-width property accepts length values and auto.

ValueDescription
lengthSpecifies the width of the columns. This can be in units such as px, em, rem, ch, etc.
autoThe browser will determine the column width based on the content and other properties.

column-width vs column-count

PropertyBehaviorBest for
column-widthSets target column width; browser picks how many fitResponsive layouts that adapt to container size
column-countFixes the exact number of columnsLayouts that always need a specific column count
Both togetherWidth is a minimum; count is a maximumReadable columns with an upper limit (e.g. never more than 3)

👀 Live Preview

Same container width with different column-width values — narrower widths produce more columns.

150px
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
200px
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
250px
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Examples Gallery

Try 200px columns, rem-based readable width, column gap spacing, and a width + count combo.

📐 Fixed Column Widths

Start with the reference example — 200px column width on a multi-column text block.

Example 1 — 200px Column Width

Set the column width of a multi-column layout to 200 pixels.

column-width-200px.html
<style>
  .columns {
    column-width: 200px;
  }
</style>

<div class="columns">
  <p>...</p>
</div>
Try It Yourself

How It Works

The browser creates as many 200px-wide columns as fit in the container; extra space is distributed between columns.

Example 2 — Readable rem-Based Width

Use 18rem so column width scales with root font size for better accessibility.

column-width-rem.css
.readable {
  column-width: 18rem;
  column-gap: 2rem;
  line-height: 1.6;
}
Try It Yourself

How It Works

Rem units keep column width proportional to the user’s base font size, improving readability when text is zoomed.

🛠 Layout Combinations

Combine column-width with gap and count for polished multi-column layouts.

Example 3 — Column Width with Gap

Add column-gap for clear spacing between auto-flowed columns.

column-width-gap.css
.spaced-columns {
  column-width: 220px;
  column-gap: 2rem;
  column-rule: 1px solid #e2e8f0;
}
Try It Yourself

How It Works

Gap and rule properties work alongside auto-flowed column widths for a clean magazine-style layout.

Example 4 — Column Width + Column Count

Set a minimum width and cap the maximum number of columns at three.

column-width-count.css
.balanced {
  column-width: 200px;
  column-count: 3;
  column-gap: 1.5rem;
}
Try It Yourself

How It Works

When both are set, column-width is the minimum and column-count is the maximum — you get responsive columns without too many on ultra-wide screens.

🧠 How column-width Works

1

Container has content

A block element holds paragraphs or other flow content.

Prerequisite
2

You set column-width

Choose a target width like 200px or 18rem.

CSS rule
3

Browser calculates columns

As many columns as fit at that width are created automatically.

Rendering
=

Responsive column layout

Column count adapts as the viewport or container resizes.

Modern Browser Support

The column-width property is supported in most modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.

Baseline · Modern browsers

Column widths everywhere

All major browsers support column-width as part of the Multi-column Layout module.

97% Modern browser support
Google Chrome 50+ · Desktop & Mobile
Full support
Mozilla Firefox 52+ · Desktop & Mobile
Full support
Apple Safari 9+ · macOS & iOS
Full support
Microsoft Edge 12+ · All versions
Full support
Opera 37+ · Modern versions
Full support
column-width property 97% supported

Bottom line: Use column-width freely for responsive multi-column text. Test combined width + count behavior on wide screens.

Conclusion

The column-width property is a useful tool for creating responsive and aesthetically pleasing multi-column layouts. By controlling the width of the columns, you can ensure a consistent and visually appealing design across different screen sizes and devices.

Experiment with different values to see how this property can enhance the layout of your web projects.

💡 Best Practices

✅ Do

  • Use 200px–350px or 30ch–45ch for readable body text columns
  • Pair with column-gap for comfortable spacing
  • Combine with column-count to cap columns on wide screens
  • Prefer rem or ch for accessible, scalable widths
  • Test layout at different viewport sizes

❌ Don’t

  • Set column width too narrow — lines become hard to read
  • Expect a fixed column count with width alone — use column-count too
  • Use column-width for grid-like precise layouts — use CSS Grid instead
  • Forget gap spacing on dense multi-column text
  • Rely on very small px widths on mobile without testing

Key Takeaways

Knowledge Unlocked

Five things to remember about column-width

Use these points when sizing responsive columns.

5
Core concepts
02

Default auto

Browser decides.

Default
🖌 03

Auto columns

Count adapts.

Behavior
📐 04

Length units

px, em, rem.

Values
🛸 05

Responsive

Fluid layouts.

Use case

❓ Frequently Asked Questions

column-width sets the optimal width of columns in a multi-column layout. The browser creates as many columns as fit in the container at that width, making layouts responsive without a fixed column count.
The initial value is auto, which means the browser determines column width based on available space and other column-related properties.
column-count fixes the number of columns. column-width sets each column's target width and lets the browser decide how many columns fit. You can combine both to cap columns while setting a minimum width.
Any valid CSS length unit such as px, em, rem, and ch. The value auto lets the browser choose the width.
Yes. As the container grows or shrinks, the browser adds or removes columns to maintain the specified column width, which is ideal for fluid layouts.

Practice in the Live Editor

Open the HTML editor, set column-width: 200px on a text container, and resize the preview to watch columns adapt.

HTML Editor →

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.

5 people found this page helpful