Style columnSpanProperty
Example
Make the h2 element span all columns:
document.getElementById("myDIV").style.columnSpan="all";
Try it Yourself »
Definition and Usage
The columnSpan property specifies how many columns an element should span.
Browser Support
![]()
Internet Explorer 10 and Opera support the columnSpan property.
Safari and Chrome support an alternative property to this property, namely the WebkitColumnSpan property.
Syntax
Return the columnSpan property:
object.style.columnSpan
Set the columnSpan property:
object.style.columnSpan="1|all|initial|inherit"
Property Values
| Value | Description |
|---|---|
| 1 | Default value. The element should span one column. |
| all | The element should span all columns. |
| initial | Sets this property to its default value. Seeinitial。 |
| inherit | Inherits this property from its parent element. Seeinherit。 |
Technical Details
| Default value: | 1 |
|---|---|
| Return value: | A string, representing the element's column-span property. |
| CSS Version | CSS3 |
Related Articles
CSS3 Tutorial:CSS3 Multiple Columns
CSS Reference Manual:column-span property
Other Extensions
Style Object