CSS Hack for Google Chrome and Safari 3.1 September 2, 2008
Valid CSS filter targeting Google Chrome and Safari 3.1
Non-compliant selectors can be used and a valid way to target individual browsers. Chrome supports every selector, just like Safari 3.1. My recommendation is to use the body:first-of-type hack, the CSS hack/filter for Safari as a filter for Safari 3+ and Chrome. There should be no reason to target Chrome with the exclusion of Safari 3.1, but if you want to target both, filtering out Safari 3.0, I would try using:
body:nth-of-type(1) p{
color: #333333;
}
Only the Google Chrome and Safari 3.1 browsers will show paragraphs as grey. The logic is:
- web pages only have one body element
- only those two browsers support the pseudo-class of
:nth-of-type() - body:nth-of-type(1) will match the first, and only, body element.
Use it as a predecessor to more specific selectors targeting the body’s children.






Looks great on Chrome!
[...] ya probaron Chrome habran notado que no renderiza como los otros navegadores. Aquí hay un pequeño hack CSS para solucionar esos pequeños errores. 0 [...]
i’m willing to try it out just to see if it works more efficiently than FireFox… if it’s faster than Firefox and isn’t IE, then i’ll use it
[...] de Google, notaras que no renderiza bien o al menos no como los demás navegadores. Pero acá un pequeño hack para solucionarlo. Tags: Chrome, CSS [...]
[...] eventuell notwendig werdender CSS-Hacks schon geklrt. Safari-Anweisungen greifen hier ebenfalls: CSS, JavaScript and XHTML Explained CSS Hack for Google Chrome and Safari 3.1 Was die Zukunft betrifft, so ist es nicht unsere Aufgabe, sie vorauszusehen, sondern sie zu [...]
[...] Quelle [...]
[...] que ya aparecieron los primeros hacks para homogeneizar la visualización, como la mostrada por evotech. [...]
[...] Para obter mais informações, visite o site evotech.net. [...]
[...] 大家都知道它是基于webkit的。有人已经写了它所支持的css选择器。http://www.evotech.net/blog/2008/09/google-chrome-browser-css-selector-support/,该网站也列出了chrome的css hack,当然能用在Safari。hedgerwow以前也列过一个Safari hack,当然chrome也能用。。挖挖。绕啊。 [...]
[...] See also: CSS Hack for Google Chrome and Safari 3.1 [...]
Work’s in Opera 9.52 too :/
[...] http://www.evotech.net/blog/20…..safari-31/ body:nth-of-type(1) p{color: #333333;} [...]
[...] CSS Hacks For Google Chrome And Safari 3.1 [...]
try this,
selector:not(:root:link) {css property}
it would be better, support even to
html:not(:root:link)
till now, only safari/chrome support a sequence of simple selectors in the :not() argument such as, h1#header, div.inner, a:hover
:root:link would not exist
[...] http://www.evotech.net/blog/2008/09/css-hack-for-google-chrome-and-safari-31/ [...]
[...] funktioniert einwandfrei, spricht wohl auch Google Chrome an, ausgetestet habe ich dies wegen Nichtvorhandenseins von Chrome nicht.gefunden bei:evotech.net [...]
[...] it if you need it: http://www.evotech.net/blog/2008/09/css-hack-for-google-chrome-and-safari-31/ This entry was posted on Friday, November 14th, 2008 at 4:24 pm and is filed under CSS/Design/web. [...]