Personally, I avoid using CSS hacks, and when writing client code I always assume that anything can be done the “legal” way.
However, in most cases a hack is useful and needed, so here are two hacks (which are, in fact a valid CSS) that can be used to target and distinguish Google Chrome and Safari:
/* Google Chrome hack */
body:nth-of-type(1) .elementOrClassName
{
/* properties go here */
}
/* Safari hack */
body:first-of-type .elementOrClassName
{
/* properties go here */
}
[...] avoid using) some more complex, and frankly scary, than others. The following application came from Martin Ivanov’s blog, dated Oct 1, 2008: /* Google Chrome hack */ body:nth-of-type(1) .elementOrClassName { /* [...]
[...] si nuestro usuario está usando Google Chrome o Safari es dificil desde nuestro CSS, pero no imposible. Ahora con este hack podemos distinguir que navegador está usando nuestro usuario pese a que los [...]