Skip to content

Instantly share code, notes, and snippets.

@yratof
Created September 25, 2014 09:21
Show Gist options
  • Save yratof/b45f0464092fb9465fff to your computer and use it in GitHub Desktop.
Save yratof/b45f0464092fb9465fff to your computer and use it in GitHub Desktop.
inline-block gap removal
/************************
I N L I N E - B L O C K
~ Gap Removal Technique ~
************************/
.i-b{
// Remove that gap
letter-spacing: -0.31em; /* webkit */
letter-spacing: -0.31rem; /* webkit */
*letter-spacing: normal; /* reset IE < 8 */
word-spacing: -0.43em; /* IE < 8 && gecko */
word-spacing: -0.43rem; /* IE < 8 && gecko */
> * {
// Apply normals to all direct child elements
display: inline-block;
zoom: 1; *display: inline; /* IE < 8: fake inline-block */
letter-spacing: normal;
word-spacing: normal;
vertical-align: top;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment