Latest web development tutorials
 

Style columnRule Property

< Style Object

Example

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

document.getElementById("myDIV").style.columnRule = "3px outset blue";
Try it Yourself »

Definition and Usage

The columnRule property is a shorthand property for setting all the columnRule* properties.

The columnRule property sets the width, style, and color of the rule between columns.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The columnRule property is supported in Internet Explorer 10 and Opera.

Firefox supports an alternative, the MozColumnRule property.

Safari and Chrome support an alternative, the WebkitColumnRule property.


Syntax

Return the columnRule property:

object.style.columnRule

Set the columnRule property:

object.style.columnRule="column-rule-width column-rule-style column-rule-color|initial|inherit"

Property Values

Value Description
columnRuleWidth Sets the width of the rule between columns. Default value is medium
columnRuleStyle Sets the style of the rule between columns. Default value is none
columnRuleColor Sets the color of the rule between columns. Default value is the color of the element
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: medium none color
Return Value: A String, representing the column-rule property of an element
CSS Version CSS3

Related Pages

CSS3 tutorial: CSS3 Multiple Columns

CSS reference: column-rule property


< Style Object