Skip to content

Instantly share code, notes, and snippets.

@jolantis
Created August 16, 2010 10:19
Show Gist options
  • Save jolantis/526745 to your computer and use it in GitHub Desktop.
Save jolantis/526745 to your computer and use it in GitHub Desktop.
useful CSS snippets
.col {
margin-bottom: -1000px;
padding-bottom: 1000px;
}
For when you want your containers to have the same height. If you are unfamiliar with this technique, I recommend reading Ed Eliot’s article: http://www.ejeliot.com/blog/61
background: #990000;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#cc0000), to(#990000));
background: -moz-linear-gradient(#cc0000,#990000);
/* And (optionally) for IE */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#cc0000, endColorstr=#990000);
text-rendering: optimizeLegibility;
Firefox’s default state (text-rendering: auto) par tially enables this, optimizing legibility on font sizes above 20px (surely legibility is most important on the smallest text?). Using the above code will optimize all font sizes, more details are avail able at MDC: https://developer.mozilla.org/en/CSS/text-rendering
.clearfix:after,.clearfixItems li:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
/* And for IE6 and IE7 */
.clearfix, .clearfixItems li {
zoom: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment