Skip to content

Instantly share code, notes, and snippets.

@robv
Created May 21, 2010 03:33
Show Gist options
  • Save robv/408423 to your computer and use it in GitHub Desktop.
Save robv/408423 to your computer and use it in GitHub Desktop.
Usefull CSS snippets
/* slightly enhanced, universal clearfix hack */
.clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { margin: 0; padding: 0; }
table { border-collapse: collapse; border-spacing: 0; }
fieldset, img, abbr, acronym { border: 0; }
address, caption, cite, code, dfn, th, var { font-style: normal; font-weight: normal; }
ol, ul { list-style: none; }
caption, th, td { text-align: left; }
h1, h2, h3, h4, h5, h6 { font-size: 1em; font-weight: normal; }
select, option, input, textarea { font-size: inherit; font-family: inherit; }
a, a:link, a:visited, a:active, a:focus { outline: none !important; }
body { font-size: 62.5%; line-height: 1; } /* line-height is a temporary trial */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment