Style columnSpan Attribute

Definition and Usage

columnSpan Specifies how many columns the element should span.

See also:

CSS3 Tutorial:CSS Multi-column

CSS Reference Manual:column-span attribute

Example

Make the h2 element span all columns:

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

Try It Yourself

Syntax

Return columnSpan attribute:

object.style.columnSpan

Set columnSpan attribute:

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

Attribute Value

Value Description
1 Default Value. The element should span a single column.
all The element should span all columns.
initial Sets this attribute to its default value. See also initial.
inherit Inherits this attribute from its parent element. See also inherit.

Technical Details

Default Value: 1
Return Value: A string that represents the column-span attribute.
CSS Version: CSS3

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
50.0 10.0 71.0 10.0 37.0