In a Bootstrap .row
, I have an arbitrary number of divs (with classes col-xs-12 col-sm-6 col-md-4 col-lg-3
) which each have their own height.
The result (on a large screen) is like this picture (.row
in red, .col
s in black):
I would like every div to be as high as it can, right below the div above it, as in the picture below. Is that possible with Bootstrap, without having to manually sort my divs into columns?
Here's my code:
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> [stuff] </div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> [stuff] </div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> [stuff] </div>
...
</div>