The column-count
CSS property breaks an element's content into the specified number of columns.
The column-count
CSS property breaks an element's content into the specified number of columns.
/* 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;
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 the column-width
is also set to a non-auto
value, it merely indicates the maximum allowed number of columns.
Initial value | auto |
---|---|
Applies to | Block containers except table wrapper boxes |
Inherited | no |
Computed value | as specified |
Animation type | an integer |
column-count =
auto |
<integer [1,∞]>
<p class="content-box"> This is a bunch of text split into three columns using the CSS `column-count` property. The text is equally distributed over the columns. </p>
.content-box { column-count: 3; }
Specification |
---|
CSS Multi-column Layout Module Level 1 # cc |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
column-count |
501 | 1212 | 521.5–74Before version 37, multiple columns didn't work withdisplay: table-caption elements. |
10 | 1511.1 | 93 | 50≤37 | 5018 | 524Before version 37, multiple columns didn't work withdisplay: table-caption elements. |
1411.1 | 91 | 5.01.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/column-count