The specification defines column-rule-width
, column-rule-style
and column-rule-color
, providing a shorthand column-rule
. These properties work in exactly the same way as the border
properties: any valid border-style
can be used as a column-rule-style
.
These properties are applied to the element which is the multicol container and therefore all columns will have the same rule. Rules are only drawn between columns and not on the outer edges. Rules should also only be drawn between columns which have content.
In this next example, a 5px-dotted rule with a color of rebeccapurple
has been created using the longhand values.
Note that the rule itself does not take up any space: a wide rule will not push the columns apart to make space for the rule. Instead, the rule overlays the gap.
The example below uses a very wide rule of 40px and a 10px gap. The rule displays under the content of the columns. To make space on both sides of the rule, the gap would need to be increased to be larger than 40px.