Latest web development tutorials

HTML DOM Style columnSpan property

Style Object Reference Style Objects

Examples

Let h2 element across all columns:

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

try it"

Definition and Usage

columnSpan attribute specifies how many columns an element should span.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10 and Opera support columnSpan property.

Safari and Chrome support another alternative of the property attribute that WebkitColumnSpan property.


grammar

Back columnSpan properties:

object .style.columnSpan

Setting columnSpan properties:

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

Property Value

描述
1 默认值。元素应横跨一列。
all 元素应横跨所有列。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

technical details

Defaults: 1
return value: String representing the column-span property element.
CSS version CSS3


related articles

CSS3 tutorial: CSS3 multi-column

CSS Reference: column-span property


Style Object Reference Style Objects