Wednesday 29 May 2013

Css ... But only for Chrome

We all know browsers like to apply css differently. So to only apply certain css rules to chrome, wrap the chrome specific code as so.

@media screen and (-webkit-min-device-pixel-ratio:0) { .myclass{ padding-top:1px; } /* Correct alignment */ }
Easy.