Skip to content
Tutorials Center
My learning

Topics

CSS Reference ยท Multi-column and Fragmentation

The column-rule-width property

Reference for the CSS column-rule-width property: set the thickness of the line between columns using keywords or lengths, with live examples and notes.

The column-rule-width property sets the thickness of the line between the columns of a multi-column container. It is one of the three longhands of column-rule, and it takes the same values as border-width.

The rule is painted in the middle of the column gap and takes no space of its own, so changing the width never moves the text. Only the gap decides how far apart the columns are.

CSS
.article {
  column-count: 3;
  column-rule-style: solid;
  column-rule-width: 4px;
}

Try it

Rule widths compared

Syntax

CSS
column-rule-width: <line-width>;
/* <line-width> = <length [0,โˆž]> | thin | medium | thick */
  • Initial value: medium
  • Applies to: multi-column containers
  • Inherited: no
  • Animatable: yes, as a length
  • Computed value: an absolute length; 0 if the rule style is none or hidden

Values

Value Description
<length> A non-negative length such as 1px or 0.25em. Percentages are not allowed.
thin A thin line. The exact size is browser defined, commonly 1px.
medium The default. Commonly 3px.
thick A thick line. Commonly 5px.

Usage notes

  • The keywords are not exact. thin, medium and thick only promise an order (thin is not thicker than medium, and so on). Use pixel or rem values for a predictable result.
  • Style first. The width does nothing while column-rule-style is none. The width then computes to 0.
  • Rules can overlap text. If the width is larger than the column-gap, the line is drawn on top of the columns. Keep the gap clearly wider than the rule.
  • Browsers round to device pixels. Very thin widths, such as 0.3px, may be drawn as one full device pixel.
  • Negative values are invalid and the declaration is ignored.

Browser support

Supported in all current major browsers.