CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES
Advertisements

CSS3 columns Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The columns CSS property is a shorthand property for setting both the column-width and the column-count properties at the same time.

The following table summarizes the usages context and the version history of this property.

Default value: auto auto; See individual properties
Applies to: Non-replaced block-level elements (except table elements), table cells, and inline-block elements
Inherited: No
Animatable: Yes, as each of the properties of the shorthand is animatable. See animatable properties.
Version: New in CSS3

Syntax

The syntax of the property is given with:

columns: 
[ column-width column-count ] | initial | inherit

The example below shows the columns property in action.

p {
    -webkit-columns: 150px 3; /* Chrome, Safari, Opera */
       -moz-columns: 150px 3; /* Firefox */
            columns: 150px 3; /* Standard syntax */
}

Property Values

The following table describes the values of this property.

Value Description
column-width Specifies the optimal width of the column in a multi-column element.
column-count Specifies the optimal number of columns in a multi-column element.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element columns property.

Browser Compatibility

The columns property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 2+ -moz-
  • Google Chrome 4+ -webkit-
  • Internet Explorer 10+
  • Apple Safari 3.1+ -webkit-
  • Opera 11.1+ -o-, 15+ -webkit-

Further Reading

See tutorial on: CSS3 Multi-column Layouts.

Related properties: column-span, column-fill, column-gap, column-rule, column-rule-color, column-rule-style, column-rule-width, column-count, column-width.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties