I'm trying to reproduce divs floating up next to each other similar to the Masonry jQuery plugin, but with native Bootstrap/CSS if it's possible.
When I tried the following code I get an output like seen below, the column on the right seems to work fine, but the other two don't. I've not added any extra code to the last column, how can I make the others float up the page to remove the space?
HTML Code, generated from PHP:
$output .= "<div class='container-fluid'>";
$output .= "<div class='row' class='article-index-areas'>";
while ($stmt -> fetch()) // Prints out the white boxes
{
$output .= "
<div class='col-sm-6 col-md-4'>
<div class='thumbnail' style='height:" . rand(100,300) . "px;'>
</div>
</div>
";
}
$output .= "</div>";
$output .= "</div>";