I have the following code where the images are fetched from the database. It keeps going breaking the DIV
and overflows
. What I want is when the images reach the end of the DIV
it should break and start a new line. But I have no idea as how to achieve this. Please help me guys.
Code
<div class="inline-flex">
<?php while($faf = $prooq->fetch()){ extract($faf); ?>
<div class="image-container"> <img class="myThumb" id="myImg" src="proofs/<?php echo $pr_image; ?>" alt="" width="160" height="100">
<div class="image-text">shreyansh ($8.75)<br>
<span><?php echo date('jS M, Y (h:i a)', strtotime($pr_uptime)); ?></span></div>
</div>
<div id="myModal" class="modal"> <span class="close">×</span> <img class="modal-content" id="modalImg">
<div id="caption"></div>
</div>
<?php } ?>
</div>
CSS
.image-container {
width: 163px;
height: 100px;
padding: 0px 0px 65px 0px;
font-size: 12px;
text-align: center;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin-right: 13px;
}
.image-text {
margin-top: 5px;
}
.image-text span {
color: #ddd;
font-size: 9px;
}
.inline-flex {
width: 100%;
display: inline-flex;
}