BBQQ STUDIO

blog

12
how to write chrome only css Monday, 12th April 2010

Sometimes webkit renders differently in chrome and the best way to target it would be:

<code>
body:nth-of-type(1) [css selector]{
[css style]
}
</code>

For example, to target div#id, simply use:

<code>
body:nth-of-type(1) div#id{
display:block;
}
</code>

update
wrong, this affects also firefox 3.6 +

use this instead:

@media screen and (-webkit-min-device-pixel-ratio:0) {
[styles inside]
}

Tags:

comment

comment