I am trying to display multiple DIV's on a page using display inline-block. This is working really well except for the last row displays incorrect spacing with some browser widths. This is best seen on larger width monitors.
Does anyone know how I can resolve this?
Thanks for any help with this.
<style type="text/css">
.item {
Margin: 0 5px;
margin-bottom:30px;
width:160px;
height:240px;
display:inline-block !important;
}
#container {
width: -moz-calc(100% - 80px);
width: -webkit-calc(100% - 80px);
width: calc(100% - 80px);
text-align: justify !important;
-ms-text-justify: distribute-all-lines;
text-justify: distribute-all-lines;
margin:50px;
}
</style>
<div id=container>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
<div class="item" style="background-color:#333" width="160" height="240"></div>
</div>