The column-count CSS property breaks an element's content into the specified number of columns.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Syntax
/* Keyword value */ column-count: auto; /* <integer> value */ column-count: 3; /* Global values */ column-count: inherit; column-count: initial; column-count: unset;
Values
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.
Formal syntax
<integer> | auto
Example
HTML
<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>
CSS
.content-box {
column-count: 3;
}
Result
Specifications
| Specification | Status | Comment |
|---|---|---|
| CSS Multi-column Layout Module The definition of 'column-count' in that specification. |
Working Draft | Initial definition. |
| Initial value | auto |
|---|---|
| Applies to | Block containers except table wrapper boxes |
| Inherited | no |
| Media | visual |
| Computed value | as specified |
| Animation type | an integer |
| Canonical order | per grammar |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | Chrome
Full support
50
| Edge
Full support
12
| Firefox
Full support
52
| IE Full support 10 | Opera
Full support
11.1
| Safari
Full support
3
| WebView Android Full support Yes | Chrome Android Full support 50 | Edge Mobile
Full support
Yes
| Firefox Android
Full support
52
| Opera Android
Full support
Yes
| Safari iOS
Full support
Yes
| Samsung Internet Android Full support 5.0 |
On display: table-caption | Chrome Full support Yes | Edge Full support Yes | Firefox Full support 37 | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android ? | Edge Mobile Full support Yes | Firefox Android Full support 37 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.
See Also
- Multiple-column Layout (Learn Layout)
- Basic Concepts of Multicol
Document Tags and Contributors
Tags:
Contributors to this page:
connorshea,
rachelandrew,
wbamberg,
mfluehr,
ddbeck,
llkk,
arronei,
chrisdavidmills,
erikadoyle,
Sebastianz,
jpmedley,
fscholz,
tim_kraut,
jsx,
teoli,
kscarfone,
Sheppy,
ethertank,
brianloveswords,
kuvik3,
Marsf,
SPQRobin,
Jürgen Jeka,
DBaron,
Waldo,
BijuGC
Last updated by:
connorshea,