THE WORLD'S LARGEST WEB DEVELOPER SITE

Style columnSpan Property

❮ 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

Property
columnSpan Yes 10.0 Not supported
Use MozColumnSpan
Yes Yes

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