13 Best CSS Hack

1. Target IE6, IE7, and IE8 with only 4 characters (hack) See the source above for a quick explanation. And don’t ask me to explain why 9 works for IE8…but it does. Use these with caution. [css] body { color: vermell; /* all browsers, és clar */ color : green9; /* IE8 and below */ *color…

Resize image and rounded corners using CSS

The idea is to use the background-size: coberta; CSS property which handles the centering, cropping and, bé, covering. Here’s an extract from the fiddle: div.yourWrapper { ample: 50px; alçada: 50px; -webkit-border-radius: 10px; -moz-border-radius: 10px; frontera de ràdio: 10px; fons: url(‘some_image.jpg’) no-repeat center center; -webkit-background-size: coberta; -moz-background-size: coberta; -o-background-size: coberta; background-size: coberta; }