Style columnSpan Property

Example

Let the h2 element span across all columns:

document.getElementById("myDIV").style.columnSpan = "all";
Try it Yourself »

Description

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


Browser Support

Property
columnSpan 50.0 10.0 71.0 10.0 37.0

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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.