Here is an example that I need
The images are being loaded from a MySQL while loop, and I want the spacing between them to be such that the left column and right column touch each side with the middle image centered. Just like in the picture :D
This is my current CSS:
#realisation .box{
float:left;
width:286px;
background:#fff;
padding:10px;
margin-right:20px;
-moz-box-shadow: 1px 2px 2px #ccc;
-webkit-box-shadow: 1px 2px 2px #ccc;
box-shadow: 1px 2px 2px #ccc;
}
#realisation .box:last-child{
margin-right:0px;
}
Here's the loop code:
<div class="box">
<div><img src="imgs/beta/imgpasrap.jpg" width="286" height="176"/></div>
<p>Text here</p>
</div>
It's working perfectly for the first three boxes, but when there are more than that, the display gets messed up. How can I achieve the layout shown in the above picture?