files/en-us/web/css/reference/properties/column-rule/index.md
The column-rule shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout.
{{InteractiveExample("CSS Demo: column-rule")}}
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'>
thin, medium, or thick. See {{cssxref("border-width")}} for details.<'column-rule-style'>
<'column-rule-color'>
{{cssinfo}}
{{csssyntax}}
/* 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;
}
{{EmbedLiveSample('Example_2')}}
{{Specifications}}
{{Compat}}