Monday, 5 March 2012

Css Browser Hacks

/* for IE6 */
*html .someClass {color:red}
/* for IE7 */
*:first-child + html .someClass {color:red}
/* inline IE7 CSS */
.someElement {
   color:blue; /* all browsers */
   *color:red;
}

/* inline IE7 CSS */
.someElement {
   color:blue; /* all browsers */
   //color:red;
/* IE7 browser */
}

/* inline IE8 CSS */
.someElement {
  color:crimson; /* all browsers */
  color:black\0/; /* IE 8 & 9 */
}
/* IE9 CSS */
:root .someElement { color:green\0/IE9; }  /* IE9 */

/* FireFox 3 and Up */
html>/**/body .someClass, x:-moz-any-link, x:default {left:1em !important}

@media screen and (-webkit-min-device-pixel-ratio:0)
{
   .someElement 

    {
         margin:1em
    }
}

No comments:

Post a Comment