CSS - Multi Column
Overview
Quick links: Exercises • Checks • Print as PDF
Estimated time: 10–15 minutes
Multi-column layout flows content vertically then across, mimicking print-like layouts for long text.
Learning Objectives
- Use column-countandcolumn-widthto define columns.
- Style gutters with column-gapandcolumn-rule.
Details & Examples
.article{ column-count: 2; column-gap: 1.5rem; }
.notes{ column-width: 18rem; column-rule: 1px solid var(--border); }
Try it
Checks for Understanding
- Which property sets a minimum column width and lets the browser decide the count?
Show answers
- column-width
Exercises
- Flow a long article into 2 columns with a rule between columns.
- Switch from fixed column-counttocolumn-widthand compare behavior.
Suggested answers
- .article{ column-count:2; column-gap:1.5rem; column-rule:1px solid var(--border) }
- .notes{ column-width:18rem }lets the browser choose count based on width