Bootstrap: how to stack divs of different heights?

Better to use .visible-sm,.visible-md, .visible-lg with clearfix classes. That helps to clear the floats according to screen sizes also.

<!-- This will clear the float in Middle and Large Size screens only -->
<div class="clearfix visible-md visible-lg"></div>

<!-- This will clear the float in Small Size screens only -->
<div class="clearfix visible-sm"></div>

See Reference: on Bootstrap 3

Leave a Comment