CSS3 column-countProperty
Example
Divide the text in the div element into three columns:
div
{
column-count:3;
-moz-column-count:3; /* Firefox */
-webkit-column-count:3; /* Safari and Chrome */
}
{
column-count:3;
-moz-column-count:3; /* Firefox */
-webkit-column-count:3; /* Safari and Chrome */
}
Try it Yourself »
More examples at the bottom of this page.
Browser Support
The numbers in the table indicate the first browser version number that supports the property.
The number immediately before -webkit-, -ms-, or -moz- is the first browser version number that supports the prefixed property.
| Property | |||||
|---|---|---|---|---|---|
| column-count | 50.0 4.0 -webkit- |
10.0 | 2.0 -moz- | 9.0 3.1 -webkit- |
37.0 15.0 -webkit 11.1 |
Attribute Definition and Usage Instructions
The column-count property specifies the number of columns an element should be divided into.
| Default Value: | auto |
|---|---|
| Inherited: | no |
| version: | CSS3 |
| JavaScript Syntax: | object.style.columnCount=3 |
Syntax
column-count: number|auto;
| Value | Description |
|---|---|
| number | The optimal number of columns that prevents the content of the element inside from flowing out. |
| auto | The number of columns will depend on other properties, such as "column-width". |
Try it Yourself - Examples
Column-gap
Divide the text in the div element into three columns, and specify a 30-pixel gap between the columns.
Column-rule
Specify the rule between the columns: width, style, and color.
Related Articles
CSS3 Tutorial:CSS3 Multiple Columns
other extensions