Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS3 columns property

CSS3 columns property

Example

Specify the width and number of columns:

div

{

columns:

100

px

3

; -

webkit-columns:

100

px

3

;

/*

Safari and Chrome

*/

moz-columns:

100

px

3

;

/*

Firefox

*/

}

Try it »

There are more examples at the bottom of this page.


Browser support

The numbers in the table indicate the first browser version that supports this property.

A number immediately before -webkit-, -ms-, or -moz- indicates the first browser version that supports that prefixed property.

property
columns 50.0
4.0 -webkit- 10.0 9.0 -moz- 9.0
3.1 -webkit- 37.0
 15.0 -webkit-       
 11.1 |

Property definition and usage

The columns property is a shorthand property for setting column width and column count.

columns is a shorthand property for column-width and column-count.

Default value: auto auto
Inherited: no
Version: CSS3
JavaScript syntax: object.style.columns="100px 3"

Syntax

columns:

column-width column-count

;

Value Description
column-width The width of the columns
column-count The number of columns

More examples

Column-count
Divide the text of a div element into three columns.

Column-gap
Divide the text in a div element into three columns and specify a 30-pixel gap between the columns.

Column-rule
Specify the rule between columns: width, style, and color.


Related Articles

CSS3 tutorial: CSS3 Multiple Columns