CSS column-rule-style Property

The column-rule-style property specifies the appearance of the decorative line drawn between adjacent columns in a CSS multi-column layout.

It determines whether the separator is solid, dashed, dotted, double, or another supported line style. The property also controls whether a column rule is visible.

The rule's thickness and color are controlled separately by column-rule-width and column-rule-color. All three properties can be combined using the column-rule shorthand.

column-rule-style Syntax

The column-rule-style property accepts one line-style keyword.

selector {
  column-rule-style: solid;
}

General Syntax

selector {
  column-rule-style: <line-style>;
}

Solid Rule

.article {
  column-rule-style: solid;
}

Dashed Rule

.article {
  column-rule-style: dashed;
}

Dotted Rule

.article {
  column-rule-style: dotted;
}

Double Rule

.article {
  column-rule-style: double;
}

No Rule

.article {
  column-rule-style: none;
}

CSS-Wide Keywords

.article {
  column-rule-style: inherit;
}
.article {
  column-rule-style: initial;
}
.article {
  column-rule-style: unset;
}
.article {
  column-rule-style: revert;
}
.article {
  column-rule-style: revert-layer;
}

Only one line-style keyword is permitted. To set the width, style, and color together, use the column-rule shorthand.

Property Values

The property supports the standard CSS line-style keywords.

Value Description
none No rule is drawn. This is the initial value.
hidden Hides the rule, producing the same visual result as none for column rules.
solid Draws one continuous line.
dashed Draws a line made of dashes.
dotted Draws a line made of dots.
double Draws two parallel lines.
groove Draws a recessed, carved-looking rule.
ridge Draws a raised-looking rule.
inset Draws an inset-style rule.
outset Draws an outset-style rule.

Property Characteristics

Characteristic Value
Initial value none
Inherited No
Applies to Multi-column containers
Computed value As specified
Animation type Discrete
Percentages Not applicable
Layout effect Decorative only; does not change column dimensions

Because the initial value is none, column rules are not visible unless a different style is specified.

How It Works

The browser paints column rules between adjacent columns according to the specified style, width, and color.

Step 1: Create a Multi-column Layout

.article {
  column-count: 3;
}

Step 2: Define Column Spacing

.article {
  column-count: 3;
  column-gap: 30px;
}

Step 3: Choose a Rule Style

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule-style: dashed;
}

Step 4: Set the Rule Width

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule-style: dashed;
  column-rule-width: 2px;
}

Step 5: Set the Rule Color

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule-style: dashed;
  column-rule-width: 2px;
  column-rule-color: #0066cc;
}

Step 6: Paint the Separators

The browser draws dashed blue rules between adjacent columns. The rules are centered within the column gaps.

Important Distinction

The rule style changes only the appearance of the separator. It does not change the number of columns, their widths, or the order in which content flows.

none and hidden

The none and hidden values prevent a column rule from being painted.

none

.article {
  column-rule-style: none;
}

The none value is the initial value and produces no visible separator.

hidden

.article {
  column-rule-style: hidden;
}

The hidden value also suppresses the rule.

Difference Between none and hidden

For column rules, both values produce the same visible result. The distinction between these keywords is more significant in certain border-conflict situations, such as collapsed table borders.

Color Does Not Override none

.article {
  column-rule-style: none;
  column-rule-color: red;
}

The rule remains invisible even though a color is specified.

Width Does Not Override hidden

.article {
  column-rule-style: hidden;
  column-rule-width: 5px;
}

The rule remains hidden regardless of its specified width.

When to Use

Use none when you want to remove a visible column separator while preserving the multi-column layout.

solid

The solid value draws a continuous line between adjacent columns.

Basic Solid Rule

.article {
  column-rule-style: solid;
}

Thin Solid Rule

.article {
  column-rule-width: 1px;
  column-rule-style: solid;
  column-rule-color: #cccccc;
}

Thick Solid Rule

.article {
  column-rule-width: 4px;
  column-rule-style: solid;
  column-rule-color: #555555;
}

Solid Rule Shorthand

.article {
  column-rule: 2px solid #777777;
}

When to Use

Solid rules provide a simple, consistent separator for articles, reference material, and other multi-column content.

Practical Consideration

A thin solid rule is often sufficient. A thicker rule may become visually distracting or crowd the adjacent content.

dashed and dotted

The dashed and dotted values create repeating patterns instead of continuous lines.

Dashed Rule

.article {
  column-rule-style: dashed;
}

Dashed Rule with Width and Color

.article {
  column-rule: 2px dashed #0066cc;
}

Dotted Rule

.article {
  column-rule-style: dotted;
}

Dotted Rule with Width and Color

.article {
  column-rule: 3px dotted #777777;
}

Pattern Rendering

The size and spacing of the dashes or dots are determined by the browser. They cannot be adjusted independently using column-rule-style.

Changing the Pattern Thickness

.article {
  column-rule-width: 4px;
  column-rule-style: dashed;
  column-rule-color: #555555;
}

Increasing the rule width changes the thickness of the pattern, but does not provide direct control over dash length or spacing.

When to Use

Dashed and dotted rules can provide a lighter visual separation than a continuous line, depending on their width and color.

double

The double value draws two parallel lines separated by a small space.

Basic Double Rule

.article {
  column-rule-style: double;
}

Double Rule with Width

.article {
  column-rule-width: 6px;
  column-rule-style: double;
  column-rule-color: #555555;
}

Shorthand Example

.article {
  column-rule: 6px double #555555;
}

How the Width Is Used

The specified rule width includes both lines and the space between them. It does not represent the thickness of each individual line.

Narrow Double Rules

.article {
  column-rule: 2px double #555555;
}

Very narrow widths may not provide enough pixels to display two clearly separated lines.

When to Use

Double rules can provide a more pronounced separator when a simple solid line is not visually distinctive enough.

Practical Consideration

Use enough width for the two lines to remain distinguishable, while keeping the column gap wide enough to avoid crowding the content.

Three-Dimensional Styles

CSS also supports several line styles that simulate recessed or raised edges through color shading.

groove

.article {
  column-rule: 6px groove #888888;
}

The groove value creates a recessed appearance.

ridge

.article {
  column-rule: 6px ridge #888888;
}

The ridge value creates a raised appearance.

inset

.article {
  column-rule: 6px inset #888888;
}

The inset value creates an inset-style line.

outset

.article {
  column-rule: 6px outset #888888;
}

The outset value creates an outset-style line.

Browser Rendering

The appearance of these styles depends on browser rendering, rule color, and rule width. For column rules, inset is rendered like ridge, while outset is rendered like groove.

When to Use

These styles are available when a raised or recessed effect is desired. For most modern interfaces, solid, dashed, or dotted rules are simpler and easier to control.

Rule Width and Visibility

The column-rule-width property controls the thickness of the separator.

Default Width

.article {
  column-rule-style: solid;
}

When no width is specified, the initial value of column-rule-width is medium.

Explicit Width

.article {
  column-rule-width: 2px;
  column-rule-style: solid;
}

Thin, Medium, and Thick

.article-thin {
  column-rule: thin solid #777777;
}
.article-medium {
  column-rule: medium solid #777777;
}
.article-thick {
  column-rule: thick solid #777777;
}

Zero Width

.article {
  column-rule-width: 0;
  column-rule-style: solid;
}

A zero-width rule does not produce a visible separator.

Width with none

.article {
  column-rule-width: 5px;
  column-rule-style: none;
}

No rule is painted because the style is none.

Rule Width and Column Gap

Column rules do not occupy layout space. A rule wider than its column gap can extend into adjacent columns.

Rule Color

The column-rule-color property sets the color used to paint the selected rule style.

Named Color

.article {
  column-rule-style: solid;
  column-rule-color: blue;
}

Hexadecimal Color

.article {
  column-rule-style: dashed;
  column-rule-color: #336699;
}

RGB Color

.article {
  column-rule-style: dotted;
  column-rule-color: rgb(51 102 153);
}

Transparent Color

.article {
  column-rule-style: solid;
  column-rule-color: rgb(0 0 0 / 30%);
}

currentColor

.article {
  color: #333333;
  column-rule-style: solid;
  column-rule-color: currentColor;
}

The currentColor keyword uses the computed text color of the multi-column container.

Style and Color Independence

Changing the rule color does not change its style. A dashed rule remains dashed regardless of the color value.

column-rule Shorthand

The column-rule shorthand combines rule width, style, and color into a single declaration.

Complete Shorthand

.article {
  column-rule: 2px solid #777777;
}

Equivalent Longhand Declarations

.article {
  column-rule-width: 2px;
  column-rule-style: solid;
  column-rule-color: #777777;
}

Changing Only the Style

.article {
  column-rule: 2px solid #777777;
  column-rule-style: dashed;
}

The later longhand declaration changes the style without resetting the width or color.

Shorthand Reset Behavior

.article {
  column-rule-width: 4px;
  column-rule-color: red;
  column-rule: dashed;
}

The shorthand resets the omitted width to medium and the omitted color to currentColor.

Style Only

.article {
  column-rule: solid;
}

This creates a solid rule using the initial width and color values.

When to Use the Longhand

Use column-rule-style when the width and color are already defined and only the line pattern needs to change.

Column Gap and Positioning

The column-gap property controls the spacing between columns, while column-rule-style controls the appearance of the line painted within that space.

Basic Example

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule: 2px solid #777777;
}

Changing the Style

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule: 2px solid #777777;
  column-rule-style: dashed;
}

Rule Position

The browser centers the separator within the column gap.

No Additional Layout Space

Changing the rule style does not increase the gap or reduce the column widths.

Narrow Gap

.article {
  column-count: 3;
  column-gap: 8px;
  column-rule: 12px solid #777777;
}

A rule wider than the gap can extend into the adjacent columns.

Single Column

.article {
  column-count: 1;
  column-rule: 2px dashed #777777;
}

No separator is visible because there are no adjacent columns.

Practical Consideration

Use enough column spacing to keep the rule visually separate from the content on both sides.

Responsive Layouts

Column-rule styles can remain consistent as a multi-column layout adjusts to different screen sizes.

Desktop Layout

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule: 2px solid #cccccc;
}

Tablet Layout

@media (max-width: 900px) {
  .article {
    column-count: 2;
    column-gap: 24px;
  }
}

Mobile Layout

@media (max-width: 600px) {
  .article {
    column-count: 1;
    column-rule-style: none;
  }
}

Automatic Column Count

.article {
  column-width: 240px;
  column-gap: 30px;
  column-rule: 1px solid #cccccc;
}

When the available width changes, the browser determines how many columns fit.

Changing Styles at Breakpoints

.article {
  column-count: 3;
  column-rule: 2px solid #777777;
}
@media (max-width: 900px) {
  .article {
    column-count: 2;
    column-rule-style: dashed;
  }
}

Single-Column Behavior

Column rules disappear naturally when the layout generates only one column. Explicitly setting column-rule-style: none is optional.

Practical Uses

Different rule styles can provide subtle or prominent visual separation between columns.

Documentation Columns

.documentation {
  column-count: 2;
  column-gap: 30px;
  column-rule: 1px solid #cccccc;
}

Reference Lists

.reference-list {
  column-width: 220px;
  column-gap: 25px;
  column-rule: 2px dashed #999999;
}

Technical Glossaries

.glossary {
  column-count: 3;
  column-gap: 30px;
  column-rule: 2px dotted #777777;
}

Emphasized Separators

.content {
  column-count: 2;
  column-gap: 35px;
  column-rule: 5px double #555555;
}

Subtle Dividers

.content {
  column-count: 2;
  column-gap: 30px;
  column-rule: 1px solid rgb(0 0 0 / 20%);
}

Removing Separators

.content {
  column-rule-style: none;
}

When Not to Use

Do not use column-rule-style to control borders between Grid or Flexbox items. Column rules apply to CSS multi-column containers.

column-rule-style Example

The following example demonstrates six column-rule styles using the same two-column layout.

Each example uses a 6-pixel rule and a 30-pixel column gap. Only the line style changes.

<div class="column-rule-style-demo">
  <div class="rule-example">
    <h3>Solid Rule</h3>
    <div class="rule-columns solid-rule">
      <p>HTML provides the structure of a web page, including headings, paragraphs, and links.</p>
      <p>CSS controls the appearance of those elements, including colors, spacing, and layout.</p>
    </div>
  </div>
  <div class="rule-example">
    <h3>Dashed Rule</h3>
    <div class="rule-columns dashed-rule">
      <p>HTML provides the structure of a web page, including headings, paragraphs, and links.</p>
      <p>CSS controls the appearance of those elements, including colors, spacing, and layout.</p>
    </div>
  </div>
  <div class="rule-example">
    <h3>Dotted Rule</h3>
    <div class="rule-columns dotted-rule">
      <p>HTML provides the structure of a web page, including headings, paragraphs, and links.</p>
      <p>CSS controls the appearance of those elements, including colors, spacing, and layout.</p>
    </div>
  </div>
  <div class="rule-example">
    <h3>Double Rule</h3>
    <div class="rule-columns double-rule">
      <p>HTML provides the structure of a web page, including headings, paragraphs, and links.</p>
      <p>CSS controls the appearance of those elements, including colors, spacing, and layout.</p>
    </div>
  </div>
  <div class="rule-example">
    <h3>Groove Rule</h3>
    <div class="rule-columns groove-rule">
      <p>HTML provides the structure of a web page, including headings, paragraphs, and links.</p>
      <p>CSS controls the appearance of those elements, including colors, spacing, and layout.</p>
    </div>
  </div>
  <div class="rule-example">
    <h3>Ridge Rule</h3>
    <div class="rule-columns ridge-rule">
      <p>HTML provides the structure of a web page, including headings, paragraphs, and links.</p>
      <p>CSS controls the appearance of those elements, including colors, spacing, and layout.</p>
    </div>
  </div>
</div>
.column-rule-style-demo {
  display: grid;
  gap: 20px;
}
.column-rule-style-demo .rule-example {
  padding: 15px;
  border: 1px solid #cccccc;
  background-color: #f8f9fa;
}
.column-rule-style-demo h3 {
  margin: 0 0 12px;
  font-size: 1.125rem;
}
.column-rule-style-demo .rule-columns {
  column-count: 2;
  column-gap: 30px;
  column-rule-width: 6px;
  column-rule-color: #666666;
}
.column-rule-style-demo .rule-columns p {
  margin: 0;
}
.column-rule-style-demo .solid-rule {
  column-rule-style: solid;
}
.column-rule-style-demo .dashed-rule {
  column-rule-style: dashed;
}
.column-rule-style-demo .dotted-rule {
  column-rule-style: dotted;
}
.column-rule-style-demo .double-rule {
  column-rule-style: double;
}
.column-rule-style-demo .groove-rule {
  column-rule-style: groove;
}
.column-rule-style-demo .ridge-rule {
  column-rule-style: ridge;
}
@media (max-width: 600px) {
  .column-rule-style-demo .rule-columns {
    column-count: 1;
  }
}
Browser Result

Solid Rule

HTML provides the structure of a web page, including headings, paragraphs, and links.

CSS controls the appearance of those elements, including colors, spacing, and layout.

Dashed Rule

HTML provides the structure of a web page, including headings, paragraphs, and links.

CSS controls the appearance of those elements, including colors, spacing, and layout.

Dotted Rule

HTML provides the structure of a web page, including headings, paragraphs, and links.

CSS controls the appearance of those elements, including colors, spacing, and layout.

Double Rule

HTML provides the structure of a web page, including headings, paragraphs, and links.

CSS controls the appearance of those elements, including colors, spacing, and layout.

Groove Rule

HTML provides the structure of a web page, including headings, paragraphs, and links.

CSS controls the appearance of those elements, including colors, spacing, and layout.

Ridge Rule

HTML provides the structure of a web page, including headings, paragraphs, and links.

CSS controls the appearance of those elements, including colors, spacing, and layout.

The solid example displays a continuous separator. The dashed and dotted examples use repeating patterns, while the double example displays two parallel lines.

The groove and ridge examples use shading to create recessed and raised appearances. Their exact rendering may vary between browsers.

All examples use the same rule width, color, and column gap. Only the column-rule-style value changes.

On narrow screens, the media query switches the content to one column, removing the need for visible separators.

Accessibility

Column rules can help distinguish adjacent columns, but they should remain decorative and should not replace meaningful HTML structure.

Choose Clear Styles

Solid and dashed rules are generally easy to recognize. Very fine dotted rules may be difficult to distinguish at some zoom levels.

Maintain Contrast

Use a rule color that remains visible against the background without competing with the text.

Avoid Excessively Thick Rules

Thick rules can crowd content or overlap adjacent columns when the gap is narrow.

Preserve Semantic Structure

Column rules do not create separate semantic sections. Use headings and appropriate HTML elements to organize content.

Do Not Depend on Rule Style Alone

If different styles are intended to communicate information, provide corresponding text or semantic markup.

Responsive Reading

Test multi-column layouts at increased zoom levels and on narrow screens. Switch to fewer columns when necessary.

Forced Colors

Test decorative separators in forced-colors modes, where browser adjustments may affect their appearance.

Important Considerations

Keep the following points in mind when using column-rule-style:

  • Purpose: Controls the visual style of separators between adjacent CSS columns.
  • Initial value: none.
  • Inheritance: The property is not inherited.
  • Valid styles: none, hidden, solid, dashed, dotted, double, groove, ridge, inset, and outset.
  • none: Prevents the separator from being drawn.
  • hidden: Also suppresses the separator.
  • solid: Draws a continuous line.
  • dashed: Draws a repeating dash pattern.
  • dotted: Draws a repeating dot pattern.
  • double: Draws two parallel lines within the specified rule width.
  • Three-dimensional styles: Use shading to simulate raised or recessed effects.
  • Rule width: Controlled separately by column-rule-width.
  • Rule color: Controlled separately by column-rule-color.
  • Shorthand: column-rule can set width, style, and color together.
  • Shorthand resets: Omitted components reset to their initial values.
  • Position: Rules are painted in the center of column gaps.
  • Layout: Rule styles do not affect column widths, gaps, or content flow.
  • Single column: No separator appears when there are no adjacent columns.
  • Animations: Changes between rule styles use discrete animation rather than smooth interpolation.
  • Browser rendering: Dashed, dotted, and three-dimensional styles may differ slightly between browsers.
  • Accessibility: Use readable column widths, sufficient spacing, and clearly visible separators.

Use column-rule-style when you need to change the separator pattern without changing its width or color. For complete rule styling, use the column-rule shorthand.

Browser Support

The column-rule-style property is widely supported in modern browsers, including Chrome, Edge, Firefox, and Safari.

It is part of the established CSS Multi-column Layout specification and can be used without vendor prefixes in current browsers.

Basic Example

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule-width: 2px;
  column-rule-style: dashed;
  column-rule-color: #777777;
}

Shorthand Equivalent

.article {
  column-count: 3;
  column-gap: 30px;
  column-rule: 2px dashed #777777;
}

Compatibility Considerations

Older browsers sometimes required vendor-prefixed multi-column properties. Modern browsers support the standard unprefixed syntax.

For current compatibility details, visit Can I Use? and search for column-rule-style.

Specifications

The column-rule-style property is defined in CSS Multi-column Layout Module Level 1.

CSS Multi-column Layout Module Level 1

The specification defines the supported line-style values, initial value, and relationship to the column-rule shorthand.