Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS3 column-rule property

CSS3 column-rule property

Example

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

div

{

column-rule:3px outset #ff00ff;

-moz-column-rule:3px outset #ff00ff; /* Firefox */

-webkit-column-rule:3px outset #ff00ff; /* Safari and Chrome */

}

Try it »

There are more examples at the bottom of this page.


Browser support

The numbers in the table indicate the first browser version that supports this property.

A number immediately before -webkit-, -ms-, or -moz- indicates the first browser version that supports that prefixed property.

property
column-rule 50.0
4.0 -webkit- 10.0 2.0 -moz- 9.0
3.1 -webkit- 37.0
 15.0 -webkit       
 11.1 |

Property definition and usage

column-rule property

The column-rule property is a shorthand property for setting all column-rule-* properties. The column-rule property sets the width, style, and color of the rule between columns.

Default value: medium none black
Inherited: no
Version: CSS3
JavaScript syntax: object.style.columnRule="3px outset #ff00ff"

Syntax

column-rule:

column-rule-width column-rule-style column-rule-color

;

Value Description
column-rule-width Sets the width of the rule between columns
column-rule-style Sets the style of the rule between columns
column-rule-color Sets the color of the rule between columns

More examples

Column-count
Divide the text of a div element into three columns.

Column-gap
Divide the text in a div element into three columns and specify a 30-pixel gap between the columns.


Related Articles

CSS3 tutorial: CSS3 Multiple Columns