Site icon DW Faisalabad

CSS column-span Property

Column Span: Let the <h2> element span across all columns:

h2 {
-webkit-column-span: all; /* Chrome, Safari, Opera */
column-span: all;
}

Try it Yourself »

More “Try it Yourself” examples below.


Definition and Usage

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

Default value: none
Inherited: no
Animatable: no. Read about animatable
Version: CSS3
JavaScript syntax: object.style.columnSpan=”all” Try it
CSS Syntax
column-span: 1|all|initial|inherit;
Property Values
Value Description
none 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

Divide the text in a <div> element into three columns:

div {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
}

Try it Yourself »

Specify the width, style, and color of the rule between columns:

div {
-webkit-column-rule: 4px double #ff00ff; /* Chrome, Safari, Opera */
-moz-column-rule: 4px double #ff00ff; /* Firefox */
column-rule: 4px double #ff00ff;
}

Try it Yourself »

Exit mobile version