This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
The column-rule shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout.
column-rule: dotted;
column-rule: solid 6px;
column-rule: solid blue;
column-rule: thick inset blue;
<section id="default-example">
<p id="example-element">
London. Michaelmas term lately over, and the Lord Chancellor sitting in
Lincoln's Inn Hall. Implacable November weather. As much mud in the streets
as if the waters had but newly retired from the face of the earth, and it
would not be wonderful to meet a Megalosaurus, forty feet long or so,
waddling like an elephantine lizard up Holborn Hill.
</p>
</section>
#example-element {
columns: 3;
column-rule: solid;
text-align: left;
}
This property is a shorthand for the following CSS properties:
column-rule: dotted; column-rule: solid 8px; column-rule: solid blue; column-rule: thick inset blue; /* Global values */ column-rule: inherit; column-rule: initial; column-rule: revert; column-rule: revert-layer; column-rule: unset;
The column-rule property is specified as one, two, or three of the values listed below, in any order.
<'column-rule-width'>Is a <length> or one of the three keywords, thin, medium, or thick. See border-width for details.
<'column-rule-style'>See border-style for possible values and details.
<'column-rule-color'>Is a <color> value.
| Initial value | as each of the properties of the shorthand:
|
|---|---|
| Applies to | multicol elements |
| Inherited | no |
| Computed value | as each of the properties of the shorthand:
|
| Animation type | as each of the properties of the shorthand:
|
column-rule =
<gap-rule-list> |
<gap-auto-rule-list>
<gap-rule-list> =
<gap-rule-or-repeat>#
<gap-auto-rule-list> =
<gap-rule-or-repeat>#? , <gap-auto-repeat-rule> , <gap-rule-or-repeat>#?
<gap-rule-or-repeat> =
<gap-rule> |
<gap-repeat-rule>
<gap-auto-repeat-rule> =
repeat( auto , <gap-rule># )
<gap-rule> =
<line-width> ||
<line-style> ||
<color>
<gap-repeat-rule> =
repeat( <integer [1,∞]> , <gap-rule># )
<line-width> =
<length [0,∞]> |
thin |
medium |
thick
<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset
/* Same as "medium dotted currentColor" */
p.foo {
column-rule: dotted;
}
/* Same as "medium solid blue" */
p.bar {
column-rule: solid blue;
}
/* Same as "8px solid currentColor" */
p.baz {
column-rule: solid 8px;
}
p.abc {
column-rule: thick inset blue;
}
<p class="content-box"> This is a bunch of text split into three columns. Take note of how the `column-rule` property is used to adjust the style, width, and color of the rule that appears between the columns. </p>
.content-box {
padding: 0.3em;
background: #ffff77;
column-count: 3;
column-rule: inset 2px #3333ff;
}
| Specification |
|---|
| CSS Multi-column Layout Module Level 1> # column-rule> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
column-rule |
501 | 1212 | 523.5–74Before Firefox 3, the default value for thenormal keyword was 0 and not 1em. |
11.115 | 93 | 5018 | 524 | 11.114 | 91 | 5.01.0 | 504.4 | 91 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule