I'm looking to create a grid layout with fixed-sized images, but I'm having trouble getting them to fill up the space properly. Here's what I want:
Unfortunately, this is what I'm currently getting:
Any suggestions on how I can make them fill the entire grid?
Here's my HTML structure:
<div id="product-pics">
<img src="img/dummy/282x282.png" alt="" class="tile" />
<img src="img/dummy/566x282.png" alt="" class="tile" />
<img src="img/dummy/282x282.png" alt="" class="tile" />
<img src="img/dummy/282x282.png" alt="" class="tile" />
<img src="img/dummy/282x566.png" alt="" class="tile" />
<img src="img/dummy/282x282.png" alt="" class="tile" />
<img src="img/dummy/282x282.png" alt="" class="tile" />
<img src="img/dummy/282x282.png" alt="" class="tile" />
<img src="img/dummy/566x282.png" alt="" class="tile" />
</div>
And here's my CSS styling:
.tile {
margin: 1px;
float: left; /* using float property to eliminate the gap between images */
}