Multi-Column Layout: columns, column-span and Fragmentation
Flowing content into newspaper-style columns: column-width and column-count and how the number of columns is chosen, gaps and rules, column-span, balancing with column-fill, break-inside, and the new column-height and column-wrap.
kvi5hnuCode Sprout team member5 min readOn this page
Multi-column layout flows content into columns like a newspaper: text fills the first column, then continues at the top of the next. Unlike grid and flexbox, you don't place items; the content is fragmented across columns automatically. It's the right tool for lists of short items, link lists in footers, glossaries and short text on wide screens.

Creating columns
.links { column-width: 12rem; } /* as many columns as fit, each at least 12rem */
.terms { column-count: 3; } /* exactly three columns */
.list { columns: 3 12rem; } /* the shorthand: at most 3, each at least 12rem */
column-widthis an ideal minimum: the browser creates as many columns as fit, then widens them to fill the container. Tested in Chrome:column-width: 180pxin a 620px container with a 20px gap gives three columns of 193.3px.column-countsets the number of columns.- With both, the count is a maximum. Tested in Chrome:
columns: 4 250pxin 620px gives two 300px columns, because a third 250px column doesn't fit.
column-width is the responsive choice: one column on phones, more on wide screens, with no media queries.
Gaps and rules
column-gap sets the space between columns; its default in multi-column is normal, which is 1em. column-rule draws a line in the middle of each gap, with the same syntax as border, and takes no space:
.terms { columns: 3; column-gap: 2rem; column-rule: 1px solid #d8cfc0; }
Spanning elements
column-span: all makes an element cross every column, such as a heading. Content before it is balanced into one set of columns, and content after it starts a new set. Tested in Chrome: a heading with column-span: all in a two-column 400px container is 400px wide. The only values are none and all.
Balancing and breaks
column-fill: balance(the default) makes columns equal in height. With a fixed height,column-fill: autofills each column in turn, leaving the last one short.break-inside: avoidkeeps an element, like a card, a figure or a list item, from being split across two columns.break-before: columnandbreak-after: columnforce a new column.

The auto panel shows why balancing is the default: filling columns in turn can leave the last ones empty, and only a fixed height makes auto meaningful.
orphansandwidowsset the minimum number of lines left at the bottom and top of a column, in Chrome and Safari.
.cards { column-width: 14rem; }
.cards > * { break-inside: avoid; margin-block-end: 1rem; }
Rows of columns: column-height and column-wrap
Traditionally, a multi-column container with a limited height creates overflow columns off to the side. New in Chrome 145: column-height sets the height of each row of columns, and column-wrap: wrap starts a new row of columns below when one is full, with row-gap between the rows. Tested in Chrome: with column-width: 100px; column-height: 60px; column-wrap: wrap in a 340px container, the text forms two rows of three columns, 70px apart with a 10px row-gap. Firefox and Safari don't support them yet, so treat them as an enhancement.
The ::column pseudo-element (Chrome 135) represents each column, mainly for CSS carousels (article 115).
body { font: 0.8rem system-ui, sans-serif; margin: 1rem; }
.glossary {
inline-size: var(--w, 20rem); margin-top: 0.5rem;
column-width: 8rem; column-gap: 1.25rem; column-rule: 1px solid #d8cfc0;
}
.glossary h3 { column-span: all; margin: 0 0 0.5rem; color: #8a3b12; }
dl { margin: 0; }
dl > div { break-inside: avoid; margin-block-end: 0.6rem; }
dt { font-weight: 700; }
dd { margin: 0; }
Narrow the box: the number of columns drops from two to one, the heading keeps spanning, and no entry is split between columns.
When not to use it
- Long text on screens: readers have to scroll down a column, back up for the next, and down again. Use it for short content, or with
column-heightandcolumn-wrapso each row fits the screen. - Galleries in reading order: items run down each column, so the first row isn't items 1, 2, 3. Use grid or grid lanes (article 72).
- Layouts with placed items: use grid.
What's current
columns,column-span,column-fill,column-ruleandbreak-insidework in all browsers.column-heightandcolumn-wrap: Chrome 145 only.::column: Chrome 135, for carousels.
Common questions
Why did my list item split across two columns?
Content fragments wherever the column ends. Add break-inside: avoid to the items.
How many columns will column-width: 15rem give?
As many as fit with their gaps; the columns then grow to fill the width.
Can I put a heading across all columns?
Yes, with column-span: all.
Why does my text run into extra columns off to the side?
The container has a fixed or maximum height that the content doesn't fit in. Instead of growing taller, a multi-column container adds overflow columns in the inline direction. Remove the height, let it scroll with overflow, or, in Chrome 145+, use column-height with column-wrap: wrap to start a new row of columns instead.
Summary
column-widthsets a minimum width and lets the browser choose the count;column-countsets the count; with both, the count is a maximum.column-gapandcolumn-rulestyle the space between columns.column-span: allcrosses every column;break-inside: avoidkeeps elements whole.column-heightwithcolumn-wrap: wrapcreates rows of columns, in Chrome 145+.
Practice questions
A 900px container has column-width: 250px and the default column-gap of 16px. How many columns are there, and how wide?
Answer
Three: three need 750 + 32 = 782px, four would need 1048px. Each is (900 − 32) / 3 ≈ 289.3px.
What does columns: 2 20rem give in a 30rem container?
Answer
One column. The count is a maximum, and two 20rem columns don't fit.
Write CSS so the cards in a multi-column list are never split between columns.
Answer
.list > .card { break-inside: avoid; }
Previous: Masonry Layouts With Grid Lanes
Next: Table Layout: Table Display, Borders, Sizing and Responsive Tables

More in CSS Course
Quiz: CSS Delicate Details
Twenty-five questions on the edge cases that surprise experienced developers: invalid custom properties, shorthands that reset values, layer order with !important, containing blocks, margin collapsing, specificity of :is() and :where(), intrinsic minimum sizes, and more, each checked in Chrome.
Quiz: CSS Interview Questions
Thirty front-end interview questions: cascade, specificity and layers, box model and margin collapsing, stacking contexts, positioning, flexbox and grid, responsive design, custom properties, performance, accessibility, modern selectors and architecture.
Quiz: CSS Course Final Exam
Thirty questions across the whole CSS course: syntax and error handling, selectors, the cascade and layers, values and units, color, the box model, backgrounds, positioning, flexbox, grid, responsive design, typography, generated content, effects, transforms, motion and architecture.
Quiz: CSS Architecture, Tooling and Debugging (CSS Part 17)
Twenty questions on modular CSS and BEM, layering a stylesheet, design tokens and theming, pattern libraries and safe refactoring, preprocessors and build tools, the at-rules reference, and debugging common CSS problems.
Discussion
Sign in to ask a question or share what you learned.