Friday, 29 July 2011

Browser fixes for Styles in CSS

To apply any styles specific to the  all IE browsers append \o/ (use zero) to the styles before the semicolon as follows
.class{ padding-top:10px \o/; }

To apply any styles specific to the  all IE7  append  either // or  * to the styles before the style as follows
.class{ //padding-top:10px; }

.class{ *padding-top:10px; }

To apply any styles specific to the  safari browser append write the styles as follows
 @media screen and (-webkit-min-device-pixel-ratio:0) 
{
   //write your styles here
}

Ex:

 @media screen and (-webkit-min-device-pixel-ratio:0)
{
    .class {font-size:15px; margin-top:3px;}
}

To apply the styles specific to IE9 then the style declaration for IE9 as follows

Ex:
:root #dvtest { left:300px\o/;}

No comments:

Post a Comment