CSS column-rule-style Property
Description
The column-rule-style
is a CSS property used to define the style of the rule line that separates columns in a multi-column layout. It allows web developers to specify whether the column rule should appear as solid, dashed, dotted, or any other supported line style. By setting this property, designers can control the visual presentation of column divisions, enhancing the readability and aesthetics of text or content arranged in multiple columns within a container element on a web page.
- Initial value
- none
- Applies to
- Multi-column elements
- Inherited
- No
- Computed value
- Specified value
- Animatable
- No
- JavaScript syntax
- object.style.columnRuleStyle
Interactive Demo
Syntax
column-rule-style: <border-style>
Values
- <border-style>Is a keyword defined by border-style describing the style of the rule. The styling must be interpreted as in the collapsing border model. Values are: none, hidden, dotted, dashed, solid, double, groove, ridge, inset and outset.
Example
<div class="book">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
.book {
columns: 3 200px;
-webkit-columns: 3 200px;
-moz-columns: 3 200px;
column-rule-color: red;
-webkit-column-rule-color: red;
-moz-column-rule-color: red;
column-rule-style: dashed;
-webkit-column-style: dashed;
-moz-column-rule-style: dashed;
column-rule-width: 2px;
-webkit-column-rule-width: 2px;
-moz-column-rule-width: 2px;
}
Browser Support
The following table will show you the current browser support for the CSS column-rule-style
property.
Desktop | |||||
12 | 50 | 52 | 11.1 | 9 |
Tablets / Mobile | |||||
50 | 52 | 11.1 | 9 | 5 | 50 |
Last updated by CSSPortal on: 1st January 2024