The columns CSS property sets the column width and column count of an element.

/* Column width */
columns: 1em;

/* Column count */
columns: auto;
columns: 1;

/* Both column width and count */
columns: 1 auto;
columns: auto 12em;
columns: auto auto;

/* Global values */
columns: inherit;
columns: initial;
columns: unset;

It is a shorthand property that sets both the column-width and column-count properties in a single, convenient declaration.

Note: As with all shorthand properties, any individual value that is not specified is set to its corresponding initial value (possibly overriding values previously set using non-shorthand properties).

Syntax

The columns property is specified as one or two of the values listed below, in any order.

Values

<'column-width'>
Is a <length> value or the keyword auto giving a hint of the optimal width of the column. The actual column width may be wider (to fill the available space), or narrower (only if the available space is smaller than the specified column width). The length must be strictly positive or the declaration is invalid.
<'column-count'>
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

<'column-width'> || <'column-count'>

Example

HTML

<p class="content-box">
  This is a bunch of text split into three columns
  using the CSS `columns` property. The text
  is equally distributed over the columns.
</p>

CSS

.content-box {
  columns: 3 auto;
}

Result

Specifications

Specification Status Comment
CSS Multi-column Layout Module
The definition of 'columns' in that specification.
Candidate Recommendation Initial definition.

Initial valueas each of the properties of the shorthand:
Applies toBlock containers except table wrapper boxes
Inheritedno
Mediavisual
Computed valueas each of the properties of the shorthand:
Animation typeas each of the properties of the shorthand:
Canonical orderper grammar

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support

50

50 -webkit-

Yes

Yes -webkit-

52

9 -moz-

10

11.1

15 -webkit-

3 -webkit-
On display: table-caption Yes Yes37 Yes Yes Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support

Yes

2.1 -webkit-

50

Yes

Yes -webkit-

52

22 -moz-

11.5

32 -webkit-

3.2 -webkit- ?
On display: table-caption Yes ? Yes37 Yes Yes ?

Document Tags and Contributors

 Last updated by: mfluehr,