jasonkarns
12/2/2009 - 10:06 PM

Cross-Browser Inline-Block

Cross-Browser Inline-Block

/* Caveats:
 - ib-block needs an explicit width
 - if the whitespace between ib-block elements is not a problem, then the ib-container class isn't necessary.
 - if Firefox 2 support is necessary, add display:-moz-inline-stack to the top of the .ib-block rule and wrap .ib-block's children in a div.
 - The IE6/7 rules can be broken out into separate ie-only stylesheets included via conditional comments.
*/

.ib-block {
    vertical-align:top;
    display:inline-block;
    *zoom:1; /* IE6/7 */
    *display:inline; /* IE6/7 */
}
.ib-container {
    letter-spacing:-.25em;
    word-spacing:-1em;
}
.ib-container .ib-block {
    letter-spacing:normal;
    word-spacing:normal;
}