THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Style columnSpan Property

Style Object Reference Style Object

Example

Let the h2 element span across 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 across.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The columnSpan property is supported in Internet Explorer 10 and Opera.

Safari and Chrome support an alternative, 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 across one column
all The element should span across all columns
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Technical Details

Default Value: 1
Return Value: A String, representing the column-span property of an element
CSS Version CSS3

Related Pages

CSS3 tutorial: CSS3 Multiple Columns

CSS reference: column-span property


Style Object Reference Style Object