If you use the column-width
property, rather than column-count
, the browser will automatically adjust the number of columns as needed to fill the available space.
http://codepen.io/cimmanon/pen/CcGlE
.foo {
columns: 500px; // shorthand, prefixes may be necessary
}