CSS column-count Property

Description

The column-count property describes the ideal number of columns into which the content of the element will be flowed. An integer value sets the ideal number of columns into which the content of the element will be flowed.

Initial value
auto
Applies to
Block level elements
Inherited
No
Media
Visual
Computed value
Specified value
Animatable
No
CSS Version
CSS3
JavaScript syntax
object.style.columnCount

Syntax

column-count: <integer> | auto

Values

  • <integer>An integer value that specifies the number of columns in the multi-column element. Values must be greater than 0. When column-width is specified with column-count and both have non-auto values, the integer value defines the maximum number of columns.
  • autoIs a keyword indicating that the number of columns should be determined by other CSS properties, like column-width.

Example

<div class="book">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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
.book { 
   -moz-column-count: 2; 
   -webkit-column-count: 2; 
   column-count: 2; 
} 

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
1012505211.19
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
50505211.195.0

Last updated by CSSPortal on: 26th October 2019