Bootstrap: Too few cards to fill number of .card-columns slightly before break point (leaves blank column)

Created on 16 Apr 2017  Â·  5Comments  Â·  Source: twbs/bootstrap

I wrote a detailed question on StackOverflow, to try to make sure this wasn't a "me doing it wrong" thing. I hope it's okay that I post a link here instead of re-typing: http://stackoverflow.com/questions/43271316/bootstrap-4-card-masonry-style-columns-column-numbers-at-breakpoints-blank.

The basic issue is shown in the below screengrabs from Chrome DevTools Version 57.0.2987.133.

The error doesn't appear to be occurring anymore (though it was happening sporadically before as well), and may have been fixed by the addition of:

    -webkit-column-count: #;
    -moz-column-count: #;

to the CSS where the .column-court was altered.

bhastings_masonry_1599
bhastings_masonry_1621
bhastings_masonry_1620
bhastings_masonry_1600

Most helpful comment

.card-columns is not working properly with .card of the same height. For the second example (with 9 cards), I would tweak the margin of either the first or the last card in order they display smoothly in all the available columns. Customizing the bootstrap CSS like this (considering the default margin-bottom of .card is 0.75rem):

.card-columns .card:first-child {
  margin-bottom: 0.74rem;
}

All 5 comments

Not seeing any issue on our end now. Guessing this was somehow resolved?

I'm seeing this issue …

screen shot 2018-02-09 at 8 00 02 am

… the upper portion is displaying 8 cards w/in card-columns, the lower displays 9

.card-columns are sometimes lil bit buggy. I've experienced same for an image gallery.

@travhall Check out https://github.com/twbs/bootstrap/issues/20321. I hope it lands in a future bootstrap version.

agreed, thanks @midzer, I'll give this a look over!

.card-columns is not working properly with .card of the same height. For the second example (with 9 cards), I would tweak the margin of either the first or the last card in order they display smoothly in all the available columns. Customizing the bootstrap CSS like this (considering the default margin-bottom of .card is 0.75rem):

.card-columns .card:first-child {
  margin-bottom: 0.74rem;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

bellwood picture bellwood  Â·  3Comments

leomao10 picture leomao10  Â·  3Comments

eddywashere picture eddywashere  Â·  3Comments

devfrey picture devfrey  Â·  3Comments

alvarotrigo picture alvarotrigo  Â·  3Comments