I have a set of elements with display: inline-block
on a container div that is supposed to expand horizontally if the contents exceed the device width. It all works well, but there's an odd margin between each .item
element, as you can see here : http://julienlima.com/
(notice the blue line between images)
<span class="fix item">
<img src="image.jpg" data-ratio="1.33" data-width="800" data-height="600" />
<div class="fix details">
<div class="fix row"><a href="#" class="title">title</a></div>
<div class="fix row"><div class="date">date</div></div>
<div class="fix row"><a href="#" class="view">View Post</a></div>
</div>
#gallery {
clear: both;
width: auto;
white-space: nowrap;
}
#gallery .item {
display: inline-block;
*display: inline;
width: auto;
min-width: 100px;
white-space: nowrap;
border-right: 1px #CCC dotted;
border-bottom: none;
padding: 0 25px;
}
#gallery .item:first-child {
margin-left: 25px;
border-left: 1px #CCC dotted;
}
There's no margin or padding messing it, and I have no idea why it behaves like this instead of floating. Any ideas?