CSS column-rule-color Property

CSS column-rule-color property sets the color of the column rule in a multi-column layout. A column rule is a vertical line that separates adjacent columns in a multi-column layout.

The color of the column rule can be set using any valid CSS color format such as ‘color name’, ‘HEX’, ‘RGB’, ‘HSL’, etc.

The example below sets a ‘red’ color column rule. Try it out to see how it works:

Example:

div{
  column-count: 3;
  column-rule-style: solid;
  column-rule-color: red;
}

Set rule color using ‘HEX’ color format:

Example:

div{
  column-count: 3;
  column-rule-style: solid;
  column-rule-color: #033dfc;
}

CSS Syntax

The column-rule-color property has the following syntax:

column-rule-color: color|initial|inherit;

Property Values

The column-rule-color property accepts the following values:

colorSpecifies the color of the column rule. It can be any valid CSS color. The default value is the current color of the element.
initialSets the column-rule-color to its default value(current color of the element).
inheritInherits the column-rule-color property from the parent element.

General Info

Default ValueThe current color of the element.
InheritedNo
JavaScript Usageelement.style.columnRuleColor = “red”

Author

  • Manoj Kumar

    Hi, My name is Manoj Kumar. I am a full-stack developer with a passion for creating robust and efficient web applications. I have hands-on experience with a diverse set of technologies, including but not limited to HTML, CSS, JavaScript, TypeScript, Angular, Node.js, Express, React, and MongoDB.

Leave a Comment