Problem Statement:
It is inevitable that there will be situations where you need a CSS rule to target a specific browser. This hack targets Safari and Chrome (webkit browsers) and works with Safari 5.1.2 and Chrome 17.0.963.56 as of March 03, 2012.
Dependencies:
A webkit browser (Safari or Chrome)
/**
* This hack targets the Webkit browser engine
* which includes Safari and Chrome.
*/
@media screen and (-webkit-min-device-pixel-ratio:0) {
div.foo {
width: 100px;
height: 100px;
border: 1px solid red;
}
}