column-count
Quick Summary for column-count
The
column-count
CSS property breaks an element's content into the specified number of columns.
Code Usage for column-count
/* Keyword value */ column-count: auto; /* <integer> value */ column-count: 3; /* Global values */ column-count: inherit; column-count: initial; column-count: revert; column-count: unset;
More Details for column-count
column-count
The column-count
CSS property breaks an element's content into the specified number of columns.
Syntax
/* Keyword value */ column-count: auto; /* <integer> value */ column-count: 3; /* Global values */ column-count: inherit; column-count: initial; column-count: revert; column-count: unset;
Values
auto
The number of columns is determined by other CSS properties, such as column-width
.
<integer>
Is a strictly positive <integer>
describing the ideal number of columns into which the content of the element will be flowed. If the column-width
is also set to a non-auto
value, it merely indicates the maximum allowed number of columns.
Formal definition
Initial value | auto |
---|---|
Applies to | Block containers except table wrapper boxes |
Inherited | no |
Computed value | as specified |
Animation type | an integer |
Formal syntax
<integer> | auto
Examples
Splitting a paragraph across three columns
HTML<p class="content-box"> This is a bunch of text split into three columns using the CSS `column-count` property. The text is equally distributed over the columns. </p>
CSS .content-box { column-count: 3; }
ResultSpecifications
Specification |
---|
CSS Multi-column Layout Module Level 2 # cc |
See also
Multiple-column Layout (Learn Layout) Basic Concepts of MulticolLast modified: Aug 12, 2021, by MDN contributors
Select your preferred language English (US)DeutschEspañolFrançais日本語Русский中文 (简体) Change language Posted in
12:22 am, February 22, 2022
Add Comment
Other Items in CSS
rgb()
rgba()
:right
right
@right-bottom
:root
rotate
rotate()
rotate3d()
rotateX()
rotateY()
rotateZ()
row-gap
ruby-align
ruby-position
saturate()
scale
scale()
scale3d()
scaleX()
scaleY()
scaleZ()
:scope
scroll-behavior
scroll-margin
scroll-margin-block
scroll-margin-block-end
scroll-margin-block-start
scroll-margin-bottom
scroll-margin-inline
scroll-margin-inline-end
scroll-margin-inline-start
scroll-margin-left
scroll-margin-right
scroll-margin-top
scroll-padding
scroll-padding-block
scroll-padding-block-end
scroll-padding-block-start
scroll-padding-bottom
scroll-padding-inline
scroll-padding-inline-end
scroll-padding-inline-start
scroll-padding-left
scroll-padding-right
scroll-padding-top
scroll-snap-align
scroll-snap-stop
scroll-snap-type
@scroll-timeline