I know that the real goal I'm seeking is the css holy grail, but in this really simple experiment, I'm getting "phantom" spacing that I'm hoping someone can explain.
The following occurs in Firefox, but not in Chrome (though Chrome has it's own issues I'll address later):
HTML:
<div id="wrapper">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
</div>
CSS:
#wrapper {
width: 760px;
height: 100px;
background-color: yellow;
}
#wrapper div {
display: inline-block;
padding: 0;
margin: 0;
width: 250px;
height: 90px;
background-color: red;
}
#wrapper #div1 {
background-color: red;
}
#wrapper #div2 {
background-color: green;
}
#wrapper #div3 {
background-color: red;
}
Notice I've used background-color instead of borders, so that any box-spacing issues are not in play (that I know of).
If I inspect each div (outer and inner) in Firebug, the widths are correct, yet there is clearly a gap between each div and the third div wraps to the next line.
This happens until I set the width to 761px, with each div having a gap of about 3-4 pixels between each inner div and 1-2 pixels after the last.
So with all margins and padding and borders turned off, where is this spacing coming from and is there a way (without floats or negative margins) to set this spacing to 0?
I thought maybe Firefox is applying inline properties such as word-spacing or letter-spacing, but I've tried turning all of these off as well.
Anyone know where this space comes from?