This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2004 > :focus and :active pseudo-classes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author :focus and :active pseudo-classes
Stephen Poley

2004-11-21, 11:18 pm

The issue of the focus pseudo-class came up a few weeks ago, and I
finally got around to trying it out (better late than never ...)

The recommended order given for the pseudo-classes is link, visited,
focus, hover, active. However:

- Mozilla doesn't seem to do anything with the active rule;
- IE gets things wrong as usual: it uses the active rule for focus; it
ignores the focus rule;
- Opera ignores both focus and active rules and substitutes its own
highlighting. (Perhaps a good decision as it results in consistency
across sites and makes it easier to see where one is.)

I'm not convinced that the active pseudo-class does anything useful
anyway; or if it does why it should need a different colour from focus.
I would suggest therefore that the pragmatic order for specifying the
pseudo-classes would be:

A:link
A:visited
A:active, A:focus /* in other words: IE focus, Gecko focus */
A:hover

Or, if you still have some <A NAME=...> tags lying around for the
benefit of NN4:

A:link
A:visited
A:active, A:focus
A:link:hover, A:visited:hover

Comments?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews