`column-count` CSS property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It's been available across browsers since March 2017.
The column-count CSS property breaks an element's content into the specified number of columns.
Try it
column-count: 2;
column-count: 3;
column-count: 4;
column-count: auto; column-width: 8rem;
<section id="default-example">
<p id="example-element">
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, and it
would not be wonderful to meet a Megalosaurus, forty feet long or so,
waddling like an elephantine lizard up Holborn Hill.
</p>
</section>
#example-element {
width: 100%;
text-align: left;
}
Syntax
/* Keyword value */ column-count: auto; /* <integer> value */ column-count: 3; /* Global values */ column-count: inherit; column-count: initial; column-count: revert; column-count: revert-layer; column-count: unset;
Values
This property is specified as a single value from the following list:
-
auto - The number of columns is determined by other CSS properties, such as
column-width. -
<integer> - Is a strictly positive
<integer>describing the ideal number of columns into which the content of the element will be flowed. If thecolumn-widthis also set to a non-autovalue, it merely indicates the maximum allowed number of columns.
Description
Setting the column-count to a value greater than 1 creates a multi-column layout. The element's content will be evenly distributed between the specified number of columns.
The column-count property, along with the column-height and column-width properties, can also be set by using the columns shorthand.
Formal definition
| Initial value | auto |
|---|---|
| Applies to | Block containers except table wrapper boxes |
| Inherited | no |
| Computed value | as specified |
| Animation type | an <a href="/en-US/docs/Web/CSS/Reference/Values/integer#interpolation" title="Values of the <integer> CSS data type are interpolated via integer discrete steps. The calculation is done as if they were real, floating-point numbers and the discrete value is obtained using the floor function.">integer</a> |
Formal syntax
column-count = <integer> | auto <integer> = <number-token>
Examples
Splitting a paragraph across three columns
HTML
<p class="content-box"> This is a bunch of text split into three columns using the CSS <code>column-count</code> property. The text is equally distributed over the columns. </p>
CSS
.content-box {
column-count: 3;
}
Result
Specifications
| Specification |
|---|
| CSS Multi-column Layout Module Level 1 # cc |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on iOS | Samsung Internet | WebView Android | WebView on iOS | |
column-count |
50
1
|
12
12
|
52
1.5–74Before version 37, multiple columns didn't work withdisplay: table-caption elements. |
37
15
|
9
3
|
50
18
|
52
4–79Before version 37, multiple columns didn't work withdisplay: table-caption elements. |
37
14
|
9
2
|
5.0
1.0
|
50
4.4
|
9
2
|
auto |
1 |
12 |
1.5 |
15 |
3 |
18 |
4 |
14 |
2 |
1.0 |
4.4 |
2 |
See also
column-heightcolumn-width-
columnsshorthand -
column-rule-color,column-rule-style,column-rule-width,column-ruleshorthand - Learn: Multiple-column Layout (Learn Layout)
- Basic Concepts of Multicol
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/column-count