Is there a Google Chrome-only CSS hack? [closed]

Sure is:

@media screen and (-webkit-min-device-pixel-ratio:0)
{ 
    #element { properties:value; } 
}

And a little fiddle to see it in action – http://jsfiddle.net/Hey7J/

Must add tho… this is generally bad practice, you shouldn’t really be at the point where you start to need individual browser hacks to make you CSS work. Try using reset style sheets at the start of your project, to help avoid this.

Also, these hacks may not be future proof.

Leave a Comment