Search code examples
twitter-bootstrapcssgoogle-chromecss-multicolumn-layout

Why is my column-count not working with Bootstrap in Chrome?


I tried displaying multiple buttons in columns using

.columnized {
    -webkit-column-count: 3;
    -moz-column-count: 3;
    column-count: 3;
}

and markup

<div class="columnized col-md-6">
    <p>
        <button type="button" class="btn btn-default btn-xs">text</button>
    </p>
    <!-- ... more buttons ... -->
</div>

but the entire div is showing like a line and all the ps looks like they are floated to the right.

It's curious that this works in Firefox 28 and even Internet Explorer 10 and not in Chrome 33.


Solution

  • I was using Twitter's Bootstrap and the .col-md-6 has defined min-height as 1px, hence the thin line.

    I managed to solve it by adding min-height: initial to my columnized class.

    Hope this helps others that bump against this odd problem.