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

HTML DOM Style columnSpan Property

Style columnSpan Property

Style Object Reference The Style object

Example

Make an h2 element span all columns:

document.getElementById("myDIV").style.columnSpan="all";

Try it »


Definition and Usage

The columnSpan property specifies how many columns an element should span.


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Internet Explorer 10 and Opera support the columnSpan property.

Safari and Chrome support an alternative property to this one, namely the WebkitColumnSpan property.


Syntax

Return the columnSpan property:

object

.style.columnSpan

Set the columnSpan property:

object

.style.columnSpan="1|all|initial|inherit"

Attribute 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. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default value: 1
Return Value: A string that represents the column-span property of an element.
CSS version CSS3

Related Articles

CSS3 Tutorial:CSS3 Multiple Columns

CSS Reference Manual:column-span property


Style Object Reference The Style object