CSS column-fill Property

Description

The column-fill property controls how contents are partitioned into columns. Contents are either balanced, which means that contents in all columns will have the same height or, when using auto, just take up the room the content needs.

Initial value
balance
Applies to
Multi-column elements
Inherited
No
Media
Visual
Computed value
As specified
Animatable
No
CSS Version
CSS3
JavaScript syntax
object.style.columnFill

Syntax

column-fill: auto | balance

Values

  • autoColumns are filled sequentially such that the columns may differ in length, depending on other column property values.
  • balanceBalance content equally between columns, if possible.

Example

<div class="book"> 
<p>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.</p>
</div>
.book { 
   -webkit-columns: 3 200px; 
   -moz-columns: 3 200px; 
   columns: 3 200px; 
   -webkit-column-fill: balance-all; 
   -moz-column-fill: balance-all; 
   column-fill: balance-all; 
}

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
10125052379
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
505052?95.0

Last updated by CSSPortal on: 26th October 2019