CSS column-rule-width Property
Description
The column-rule-width
CSS property is used to specify the width of the rule (line) that separates columns in a multi-column layout. It allows web developers to control the thickness of the vertical lines that appear between adjacent columns when using the CSS column-count or column-width properties to create multi-column text layouts. By adjusting the value of column-rule-width, designers can achieve the desired visual separation between columns, enhancing readability and aesthetics in their web content. This property works in conjunction with other column-related properties to fine-tune the appearance of multi-column layouts.
- Initial value
- medium
- Applies to
- Multi-column elements
- Inherited
- No
- Computed value
- absolute length; '0' if the column rule style is 'none' or 'hidden'
- Animatable
- No
- JavaScript syntax
- object.style.columnRuleWidth
Interactive Demo
Syntax
column-rule-width: <border-width>
Values
- <border-width>Is a <length> or one of the thin, medium or thick keyword describing the width of the rule separating two columns.
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-width
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