Table of contents
- 1. Summary
- 2. Syntax
- 3. Examples
- 4. Specifications
- 5. Browser compatibility
- 6. See also
« CSS « CSS Reference
Summary
The columns CSS property is a shorthand property allowing to set both the column-width
and the column-count
properties at the same time.
- Initial value
:
autofor both properties - Applies to: non-replaced block-level elements (except table elements), table cells, and inline-blocks elements
- Inherited : no
- Media:
visual - Computed value : specified value for the column-count part, the length for the column-width part
Syntax
columns: <column-count> || <column-width>
where :
- <column-width>
- Is a
<length>value 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 thecolumn-widthis also set to a non-auto value, it merely indicates the maximum allowed number of columns.
Examples
.content-box {
border: 10px solid #000000;
columns:3;
}
Specifications
| Specification | Status | Comment |
|---|---|---|
| CSS Multi-column Layout Module Level 3 | Candidate Recommendation |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | (Yes) -webkit | 9 (9) -moz | 10 | 11.1 | 3.0 (522) -webkit |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | (Yes) | ? | ? | ? |
See also
- CSS Reference
- The column-related CSS properties:
column-width,column-count,column-gap,column-rule,column-rule-width,column-rule-style,column-rule-color,column-span,column-fill,columns


Mozilla Developer Network