Skip to content

Instantly share code, notes, and snippets.

@jasonkarns
Created December 2, 2009 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonkarns/247649 to your computer and use it in GitHub Desktop.
Save jasonkarns/247649 to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment