CSScolumn-rule Property
Example
Specify the width, style, and color of the rule between columns:
column-rule: 4px double #ff00ff;
}
More "Try it Yourself" examples below.
Definition and Usage
Thecolumn-rule property sets the width, style, and color of the rule between columns.
This property is a shorthand property for:
If column-rule-color is omitted, the color applied will be the color of the text.
| Default value: | medium nonecolor |
|---|---|
| Inherited: | no |
| Animatable: | yes,see individual properties.Read aboutanimatableTry it |
| Version: | CSS3 |
| JavaScript syntax: | object.style.columnRule="3px outset blue"Try it |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | |||||
|---|---|---|---|---|---|
| column-rule | 50 | 10 | 52 | 9 | 37 |
CSS Syntax
Property Values
| Value | Description | Demo |
|---|---|---|
| column-rule-width | Sets the width of the rule between columns. Default value is medium | Demo ❯ |
| column-rule-style | Sets the style of the rule between columns. Default value is none | Demo ❯ |
| column-rule-color | Sets the color of the rule between columns. Default value is the color of the element | Demo ❯ |
| initial | Sets this property to its default value.Read aboutinitial | |
| inherit | Inherits this property from its parent element.Read aboutinherit |
More Examples
Example
Divide the text in a <div> element into three columns:
column-count: 3;
}
Related Pages
CSS tutorial:CSS Multiple Columns
HTML DOM reference:columnRule property

