English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Reference Manual

CSS @rules (RULES)

Complete List of CSS Properties

CSS3 column-span attribute usage and examples

column-The span CSS attribute specifies the number of columns an element spans in a multi-column layout. Elements that span multiple columns are called spanning elements.

The following table provides usage instructions and version history for this attribute, as well as its usage syntax in JavaScript scripts.

Default value:none
Applies to:Block-level elements, floated and absolutely positioned elements are excepted
Inheritance:None
Animatable:No.See also Animation properties.
Version: CSS3new feature
JavaScript syntax:object.style.columnSpan="all"

column-span usage syntax

The syntax of this attribute is as follows:

column-span: none | all | initial | inherit

The following examples demonstrate how to use column-span attribute.

h1 {
    -webkit-column-span: all; /* Chrome, Safari, Opera */
            column-span: all; 
}
Test and see‹/›

Attribute values

The following table describes the values of this attribute.

ValueDescription
noneElements do not span multiple columns. This is the default value.
all

Elements span all columns on the page. All content declared before the element is displayed before the element.

initialSet this attribute to its default value.
inheritIf specified, the associated elements use their parent element's column-span attribute values.

Browser compatibility

column-Browser compatibility, the numbers in the table below represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.

  • Firefox 2+ -moz-

  • Google Chrome 4+ -webkit-

  • Internet Explorer 10+

  • Apple Safari 3.1+ -webkit-

  • Opera 11.1+ -o-,15+ -webkit-

For further reading

Please refer to the following tutorials:CSS3Multi-column layout.

Related attributes:column-width,column-fill,column-gap,column-rule,column-rule-color,column-rule-style,column-rule-width,column-count,columns.