On my website I'm using a three column layout to display some cards - a bit like Google+. However, the cards I'm displaying are dynamic as in I don't know how many will be displayed. I don't know how I can divide these over the three columns evenly.
This is a typical column:
<div class="col-md-4 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading"><a href="#" class="pull-right">View all</a> <h4>A Title here.</h4></div>
<div class="panel-body">
<p><img src="//placehold.it/150x150" class="img-circle pull-right"> <a href="#">A description here.</a></p>
<div class="clearfix"></div>
<hr>
Some text here.
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><a href="#" class="pull-right">View all</a> <h4>A Title here.</h4></div>
<div class="panel-body">
<p><img src="//placehold.it/150x150" class="img-circle pull-right"> <a href="#">A Description here.</a></p>
<div class="clearfix"></div>
<hr>
Some text here.
</div>
</div>
</div>
This is the PHP loop I use - it's fairly standard: while($row = mysql_fetch_assoc($result)) { }
There are three of these and ideally I want the cards to be evenly distributed over the three columns.
<div class="col-md-4 col-sm-6">next to each other. And I want to distribute the<div class="panel panel-default">over these.