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 definition

Initial value auto
Applies to Block containers except table wrapper boxes
Inherited no
Computed value as specified
Animation type an integer

Formal syntax

<integer> | auto

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 `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.

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
column-count 50
50
1
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
12
12
12
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
52
52
1.5 — 74
Prefixed
Prefixed Implemented with the vendor prefix: -moz-
Prior to version 37, multiple columns didn't work with display: table-caption elements.
10 11.1
11.1
15
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
9
9
3
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Mobile
Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
column-count 50
50
≤37
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
50
50
18
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
52
52
4
Prefixed
Prefixed Implemented with the vendor prefix: -moz-
Prior to version 37, multiple columns didn't work with display: table-caption elements.
11.1
11.1
14
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
9
9
1
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
5.0
5.0
1.0
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-

See also

© 2005–2020 Mozilla 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