W3cubDocs

/CSS

column-count

The column-count CSS property breaks an element's content into the specified number of columns.

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 the column-width is also set to a non-auto value, 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 compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 50
50
Yes
Prefixed
Prefixed Requires the vendor prefix: -webkit-
12
12
12
Prefixed
Prefixed Requires the vendor prefix: -webkit-
52
52
1.5
Prefixed
Prefixed Requires the vendor prefix: -moz-
10 11.1
11.1
15
Prefixed
Prefixed Requires the vendor prefix: -webkit-
3
Prefixed
3
Prefixed
Prefixed Requires the vendor prefix: -webkit-
On display: table-caption Yes Yes 37 Yes Yes Yes
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support Yes 50 Yes
Yes
Yes
Prefixed
Prefixed Requires the vendor prefix: -webkit-
52
52
4
Prefixed
Prefixed Requires the vendor prefix: -moz-
Yes
Yes
Yes
Prefixed
Prefixed Requires the vendor prefix: -webkit-
Yes
Yes
Yes
Prefixed
Prefixed Requires the vendor prefix: -webkit-
5.0
On display: table-caption Yes ? Yes 37 Yes Yes ?

See Also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/column-count