The column-rule property draws a line between columns in multi-column layouts — a shorthand for width, style, and color.
01
Column Line
Divider between cols.
02
Shorthand
Width style color.
03
none Default
No rule by default.
04
solid / dashed
Border-like styles.
05
column-gap
Space for the rule.
06
Readability
Visual separation.
Fundamentals
Definition and Usage
The column-rule CSS property defines the appearance of the rule (line) between columns in a multi-column layout. It is a shorthand for setting the width, style, and color of the divider between columns.
It helps enhance visual separation between columns, making content easier to read and more aesthetically pleasing — similar to the lines between newspaper columns.
💡
Beginner Tip
Always set column-gap when using column-rule. The rule is drawn in the gap — without gap space, the line may not be visible.
Foundation
📝 Syntax
The syntax for column-rule follows the same pattern as border:
column-rule accepts three components — width, style, and color — combined in one shorthand declaration.
Width
Can be any length value or keyword:
Keywords: thin, medium, thick
Lengths: 1px, 5px, 0.2rem, etc.
Style
Determines the line style between columns:
none — no rule (default style component)
solid, dashed, dotted, double
groove, ridge, inset, outset
Color
Can be any valid CSS color value — named colors, hex, rgb, hsl, or currentColor.
Component
Example
Meaning
Full shorthand
column-rule: 5px solid black;
5px solid black line between columns
Default
column-rule: medium none currentcolor;
No visible rule between columns
Dashed
column-rule: 1px dashed #94a3b8;
Light dashed divider
nonesoliddasheddotteddouble
Longhand
Longhand Properties
The column-rule shorthand expands into three individual properties:
column-rule-width — thickness of the line
column-rule-style — line style (solid, dashed, etc.)
column-rule-color — line color
Use longhand when you only need to change one part of the rule, such as color alone.
Preview
👀 Live Preview
Both blocks use three columns with gap. The left has no rule; the right uses column-rule: 2px solid #64748b.
No column-rule
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
2px solid rule
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Hands-On
Examples Gallery
Try a solid black rule, dashed dividers, dotted color rules, and a subtle thin line.
📐 Basic Column Rules
Start with the reference example — a three-column layout with a 5px solid black rule.
Example 1 — Three Columns with 5px Solid Black Rule
Create a three-column layout with a solid black rule between columns.
Two columns separated by a dashed gray rule. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
How It Works
The dashed style creates a broken line — softer than a solid rule for casual layouts.
🎨 Styled Column Rules
Experiment with dotted lines, brand colors, and thin dividers.
Example 3 — Dotted Rule with Brand Color
Combine a dotted style with a custom color for a decorative column divider.
Three columns with a purple dotted rule. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
How It Works
Style and color work together — dotted plus a purple hex value creates a branded divider.
Example 4 — Thin Subtle Column Rule
Use a 1px solid line in a light gray for a clean, minimal magazine layout.
A subtle thin rule separates two article columns without overpowering the text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
How It Works
A thin, light rule provides separation without drawing too much attention away from the content.
🧠 How column-rule Works
1
Columns and gap are set
Define columns with column-count and space with column-gap.
Prerequisite
2
You define the rule
Set width, style, and color with column-rule shorthand.
CSS rule
3
Browser draws lines in gaps
A vertical rule appears centered in each column gap, running the full height of the container.
Rendering
=
📐
Clear column separation
Readers see distinct columns with visible dividers that improve scanability.
Compatibility
Modern Browser Support
The column-rule property is supported in most modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
Column rules in today’s browsers
All major browsers support column-rule as part of the Multi-column Layout module.
97%Modern browser support
Google Chrome50+ · Desktop & Mobile
Full support
Mozilla Firefox52+ · Desktop & Mobile
Full support
Apple Safari9+ · macOS & iOS
Full support
Microsoft Edge12+ · All versions
Full support
Opera37+ · Modern versions
Full support
column-rule property97% supported
Bottom line: Use column-rule for multi-column dividers. Pair with adequate column-gap so rules render clearly.
Wrap Up
Conclusion
The column-rule property is a versatile tool for adding visual distinction between columns in a multi-column layout. By adjusting the width, style, and color of the column rule, you can enhance the readability and design of your content.
Experiment with solid, dashed, and dotted styles to see how they can improve the appearance of your multi-column layouts.
Use subtle 1px rules for professional article layouts
Match rule color to your design system palette
Use longhand properties when changing only color or style
Test rule visibility on light and dark backgrounds
❌ Don’t
Use very thick rules that dominate the layout
Forget column-gap — rules need gap space to show
Confuse column-rule with the element’s outer border
Use heavy dashed rules on narrow mobile columns
Assume rules replace the need for readable column spacing
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about column-rule
Use these points when styling column dividers.
5
Core concepts
📐01
Column divider
Line between cols.
Purpose
⚙02
Shorthand
Width style color.
Syntax
🔢03
none Default
No rule shown.
Default
↔04
Needs gap
column-gap space.
Tip
🛸05
Border styles
solid dashed dotted.
Values
❓ Frequently Asked Questions
column-rule defines the line drawn between columns in a multi-column layout. It is a shorthand for column-rule-width, column-rule-style, and column-rule-color.
The initial value is equivalent to medium none currentcolor, which means no visible rule appears between columns by default.
Yes. column-rule is drawn in the gap between columns. Set column-gap to a visible size so the rule has space to appear.
column-rule only appears between columns inside a multi-column container. border wraps the entire element's outer edge.
It supports the same line styles as border, including none, solid, dashed, dotted, double, groove, ridge, inset, and outset.