column-rule-width h1537
The column-rule-width property is used to set the width of the multi-column layout. 6c2h2f
A column rule is kind of like a border that you can add to separate adjacent columns in the same multi-column layout. It can even have styles like those a border can have, and the same width values. See the values section below for a list of possible values.
A column rule is drawn only between adjacent columns; that is, it is not drawn before the first column, nor is it drawn after the last column.
A column rule does not take up any space. This means that adding a column rule will not increase the amount of space, or the column-gap
), between the columns.
Official Syntax 4j1l4a
- Syntax:
column-rule-width: <length> | thin | medium | thick
- Initial: medium
- Applies To: multi-column elements
- Animatable: yes, as a length
Values 4w6m73
- <length>
-
The width of the column rule is set to the specified length. See the
<length>
entry for a list of possible values. Negative values are not allowed. - thin
- A thin column rule. Implementation-specific. See note below and the live demo for examples.
- medium
- A medium column rule. Implementation-specific. See note below and the live demo for examples.
- thick
- A thick column rule. Implementation-specific. See note below and the live demo for examples.
Notes 5i3os
The specification doesn’t precisely define the thickness of each of the keywords, which is therefore implementation specific, but the values are constant throughout a document and thin ? medium ? thick. A browser could, for example, make the thickness depend on the medium
font size: one choice might be 1px (for thin
), 3px (for medium
) & 5px (for thick
) when the medium
font size is 17px or less.
Examples 3y6d6i
The following will apply a pink-colored thin column rule to a multi-column element:
.mag { columns: 12em; column-rule-width: thin; column-rule-style: solid; column-rule-color: #0098D8; }
The following are all possible column-rule-width
values:
column-rule-width: 5px; column-rule-width: 10%; column-rule-width: thick; column-rule-width: 2em;
Live Demo 176n59
Change the column rule width in the following demo to see how it is drawn. You should also notice how, no matter how thin or thick the rule gets, it does not affect the space between the columns specified using the column-gap
property.
Browser s162l
CSS3 Multiple column layout 1x2y3u
Method of flowing information in multiple columns
W3C Candidate Recommendation
ed from the following versions:
Desktop 1i5h4c
- 50
- 52
- 10
- 11
- 10
Mobile / Tablet 1u2r2g
- 10
- 66
- all
- 66
- 60