I have created CSS styles for hover and visited links. The hover element correctly changes color (to red) for the link I am pointing at as long as it is unvisited. But once that link has been visited (and changed color from blue to purple), the hover style doesn't work anymore - the link still remains purple, even when hovered over.

What am I doing wrong? Does it matter which order the styles appear in on the style sheet?

Comments

US421’s picture

Order does matter. Remember LoVeHAte, or
1. a:link
2. a:visited
3. a:hover
4. a:active

Heine’s picture

Order matters; it should be LoVe/HAte; link (normal), visited, hover, active.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.

PakWaan’s picture

Thank you, it was indeed in the wrong order.