Multi-column layout
Multi-column layout flows an element's content across one or more columns in a single row, without affecting the display property of its children.
Overview
Multi-column layout flows an element's content across one or more columns in a single row, without affecting the display property of its children.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 50 | 12 | 52 | 9 | 50 | 9 | |
multicol context Supported in Multi-column Layout | 123 | 123 | | 17.4 | 123 | 17.4 |
auto | 1 | 12 | 1.5 | 3 | 18 | 2 |
| Other | ||||||
| The column-gap CSS property sets the size of the gap (Gutters) between an element's columns. | 1 | 12 | 1.5 | 3 | 18 | 2 |
| CSS property | ||||||
multicol context Supported in Multi-column Layout | 50 | 12 | 52 | 10 | 50 | 10 |
multicol context.calc values `calc()` values | 66 | 16 | 61 | 12.1 | 66 | 12.2 |
multicol context.percentage values `<percentage>` values | 66 | 16 | 61 | 12 | 66 | 12 |
normal | 1 | 12 | 1.5 | 3 | 18 | 2 |
| Other | ||||||
| The column-rule shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. | 50 | 12 | 52 | 9 | 50 | 9 |
| The column-rule-color CSS property sets the color of the line drawn between columns in a multi-column layout. | 50 | 12 | 52 | 9 | 50 | 9 |
| CSS property | ||||||
transparent | 1 | 12 | 3.5 | 3 | 18 | 2 |
| Other | ||||||
| The column-rule-style CSS property sets the style of the line drawn between columns in a multi-column layout. | 50 | 12 | 52 | 9 | 50 | 9 |
| CSS property | ||||||
dashed | 1 | 12 | 3.5 | 3 | 18 | 2 |
dotted | 1 | 12 | 3.5 | 3 | 18 | 2 |
double | 1 | 12 | 3.5 | 3 | 18 | 2 |
groove | 1 | 12 | 3.5 | 3 | 18 | 2 |
hidden | 1 | 12 | 3.5 | 3 | 18 | 2 |
inset | 1 | 12 | 3.5 | 3 | 18 | 2 |
none | 1 | 12 | 3.5 | 3 | 18 | 2 |
outset | 1 | 12 | 3.5 | 3 | 18 | 2 |
ridge | 1 | 12 | 3.5 | 3 | 18 | 2 |
solid | 1 | 12 | 3.5 | 3 | 18 | 2 |
| Other | ||||||
| The column-rule-width CSS property sets the width of the line drawn between columns in a multi-column layout. | 50 | 12 | 52 | 9 | 50 | 9 |
| CSS property | ||||||
medium | 1 | 12 | 3.5 | 3 | 18 | 2 |
thick | 1 | 12 | 3.5 | 3 | 18 | 2 |
thin | 1 | 12 | 3.5 | 3 | 18 | 2 |
dashed | 1 | 12 | 3.5 | 3 | 18 | 2 |
dotted | 1 | 12 | 3.5 | 3 | 18 | 2 |
double | 1 | 12 | 3.5 | 3 | 18 | 2 |
groove | 1 | 12 | 3.5 | 3 | 18 | 2 |
hidden | 1 | 12 | 3.5 | 3 | 18 | 2 |
inset | 1 | 12 | 3.5 | 3 | 18 | 2 |
medium | 1 | 12 | 3.5 | 3 | 18 | 2 |
none | 1 | 12 | 3.5 | 3 | 18 | 2 |
outset | 1 | 12 | 3.5 | 3 | 18 | 2 |
ridge | 1 | 12 | 3.5 | 3 | 18 | 2 |
solid | 1 | 12 | 3.5 | 3 | 18 | 2 |
thick | 1 | 12 | 3.5 | 3 | 18 | 2 |
thin | 1 | 12 | 3.5 | 3 | 18 | 2 |
transparent | 1 | 12 | 3.5 | 3 | 18 | 2 |
| Other | ||||||
| The column-width CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the column-width value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. | 50 | 12 | 50 | 9 | 50 | 9 |
| CSS property | ||||||
auto | 1 | 12 | 1.5 | 3 | 18 | 2 |
| Other | ||||||
| The columns CSS shorthand property sets the maximum number of columns to use when drawing an element's contents, along with the minimum width and maximum height of the element's columns. | 50 | 12 | 52 | 9 | 50 | 9 |
| CSS property | ||||||
multicol context Supported in Multi-column Layout | 66 | 16 | 61 | 14.1 | 66 | 14.5 |
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (1.5)
- Before version 37, multiple columns didn't work with `display: table-caption` elements.
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- Available with a vendor prefix: -webkit- (2)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (1.5)
- Before Firefox 3, the default value for the `normal` keyword was `0` and not `1em`.
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (3.5)
- Before Firefox 3, the default value for the `normal` keyword was `0` and not `1em`.
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (3.5)
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (3.5)
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (3.5)
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (1.5)
- Before version 37, multiple columns didn't work with `display: table-caption` elements.
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -webkit- (50)
- Available with a vendor prefix: -webkit- (12)
- This feature was removed in a later browser version (74)
- Available with a vendor prefix: -moz- (9)
- Before version 37, multiple columns didn't work with `display: table-caption` elements.
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (50)
- Available with a vendor prefix: -webkit- (3.2)
Syntax
.article-body { column-count: 3; column-gap: 2rem; column-rule: 1px solid #ddd; } /* width-based auto-columns */ .list-columns { column-width: 200px; column-gap: 1.5rem; } Live demo
Column-width(automulticol only)
Multi-column layout Column-width(automulticol only) demo.
Use cases
Using Multi-column layout
Multi-column layout flows an element's content across one or more columns in a single row, without affecting the display property of its children.
Cautions
- May not be supported in older browsers.
Accessibility
- Make sure visual changes are conveyed appropriately to assistive technology.
Related links
Powered by web-features