jsFiddle Demo
I cannot seem to figure out why using display:inline-block
would cause this
Ok as already mentioned very briefly in the comments:
inline-block
This value causes an element to generate an inline-level block container. The inside of an inline-block is formatted as a block box, and the element itself is formatted as an atomic inline-level box.
inline
This value causes an element to generate one or more inline boxes.
The most important part for this topic would be that the element itself get's formatted not just the content. Every inline-block element will be seen as atomic inline box and thus take up space.
Source: http://www.w3.org/TR/CSS2/visuren.html#inline-boxes