mardi 4 août 2015

Divs, including php to appear next to each eachother

Using Bootstrap to layout the page and at first I had images in a grid, like on Facebook, there were 4 in a row and as the page shrunk so did the number of images in a row. Now I have added php so it is easier to update the page but the images all appear under each other. How can I have it the way it was?

Code used:

<section  id="alf40">
   <div class="container-fluid no-padding ">
<div class="row">

        <div class="col-lg-3 col-md-4 col-xs-6 thumb" style="display:inline-block; float:left; position:relative;" >
        <?php $SQL = "SELECT * FROM nw_photo";
        $result = mysql_query($SQL);
        while ( $db_field = mysql_fetch_assoc($result) ) { ?>

            <a class="thumbnail" href="#"><img class="img-responsive" src="
    <?php echo $db_field['image']; ?>" style="display:inline-block; float:left; position:relative;">
            <?php } ?></a>
        </div>

</div>
</div>
  </section>

Aucun commentaire:

Enregistrer un commentaire