Reputation: 4869
I have two similar divs which are beside each other. But there is white space in between which I cannot remove?
My html as below
<div class="model-box" style="background-color:red;display:inline-block;width:98px;height:30px;">
</div>
<div class="model-box" style="background-color:red;display:inline-block;width:98px;height:30px;">
</div>
the fiddle as below
Why is this so?
Thanks in advance for the help?
Upvotes: 0
Views: 99
Reputation: 10217
It's because of the white-space character in between the divs, you could just get rid of it, see: http://jsfiddle.net/xJW7G/1/, or comment it out e.g.
<div class="model-box" style="background-color:red;display:inline-block;width:98px;height:30px;">
</div><!--
--><div class="model-box" style="background-color:red;display:inline-block;width:98px;height:30px;">
</div>
Upvotes: 2