http://www.hedgerwow.com/360/dhtml/detect-safari3-by-js-css.html
Fix Safari 3 yourself, if you have to. :-<
Keep It Simple, Stupid
{ 2007 06 22 }
http://www.hedgerwow.com/360/dhtml/detect-safari3-by-js-css.html
Fix Safari 3 yourself, if you have to. :-<
Chris Griego | 12-Jul-07 at 8:58 am | Permalink
CSS test applies in Opera 9.
hedgerwang | 12-Jul-07 at 9:32 am | Permalink
Thanks for the update.
Cezary Okupski | 16-Nov-07 at 3:24 am | Permalink
It seems that WebKit has got a problem with a space between the operator “and” and the second argument which is (-webkit-min-device-pixel-ratio:0). Therefore you can write
@media all and (-webkit-min-device-pixel-ratio:0){
/* Safari 3 & Opera */
}
and later in the cascade
@media all and(-webkit-min-device-pixel-ratio:0){
/* Opera */
}
to overwrite it for Opera. This is a complete hack for it.
Cezary Okupski | 16-Nov-07 at 3:41 am | Permalink
Actually, there’s a shorter way to do it (remember about the space after “and”):
@media all and (-webkit-min-device-pixel-ratio:0){
#sampleId{/*for WebKit*/}
html:first-child>body #sampleId{/* for Opera */}
}
ultimate | 16-Nov-07 at 4:13 am | Permalink
@media all and (-webkit-min-device-pixel-ratio:0){
#sampleId{/*for WebKit*/}
html:first-child #sampleId{/* for Opera */}
}
BTreeHugger | 15-Jun-08 at 9:07 am | Permalink
If you don’t want to reverse anything, but want to target only Opera 9 up:
@media all and (-webkit-min-device-pixel-ratio:10000) {}
If you want to target Webkit only, then use a min-ratio of 0 and prepend this to each hack inside the query:
body:not(:root:root)
You can also prepend :root to each selector in the Opera-only one to target only Opera 9.5, and prepend :lang(e) or another “too short” language name to target only Opera 9 before 9.5.