jquery - Bootstrap Make Divs Float Next to Each Other in Columns -


i'm trying reproduce divs floating next each other similar masonry jquery plugin, native bootstrap/css if it's possible.

when tried following code output seen below, column on right seems work fine, other 2 don't. i've not added code last column, how can make others float page remove space?

enter image description here

html code, generated php:

$output .= "<div class='container-fluid'>"; $output .= "<div class='row' class='article-index-areas'>";  while ($stmt -> fetch()) // prints out 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>"; 

i met same requirement in project,you need give position:absolute , set top,left,width,height of each , every elements.

for example,if have dynamical project,first measure each element assign next element top,left position absolute.

check in pinterest: https://in.pinterest.com/

in pinterest,check inspect each item of css properties,its interesting.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -