Sent by Eric A. Meyer on 26 February 2002 17:05
At 15:53 -0600 2/26/02, Dennis Jenders wrote:
>I always make sure I place them in the correct order:
>
>a:link { color: #666; }
>a:hover { color: #ffcc00; text-decoration: none;}
>a:active { color: #666; }
>a:visited { color: #666; }
>
>Always works for me when I do that.
While there's nothing inherently wrong with that order, it will
prevent visited links from showing the hover color in CSS-conformant
browsers, so many would argue that the order is not "correct" from a
functional point of view. The recommended way to write what you have
would be:
a:link { color: #666; }
a:visited { color: #666; }
a:hover { color: #ffcc00; text-decoration: none;}
a:active { color: #666; }
Of course, since you have your link, visited, and active styles doing
exactly the same thing, the problem would be less apparent in
browsers. Until you hovered a link, anyway.
--
Eric A. Meyer (http://www.meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
-- Martina Kosloff (http://www.mako4css.com/)