CSS - a:visited:hover?

TimG picture TimG · Aug 26, 2009 · Viewed 31.5k times · Source

How can I apply a font color only to hyperlinks which have already been visited and are being hover by the mouse?

Essentially, what I want to do is

a:visited:hover {color: red}

Answer

Gumbo picture Gumbo · Aug 26, 2009

Yes that is possible.

Here’s an example:

<style type="text/css">
    a:link:hover {background-color:red}
    a:visited:hover {background-color:blue}
</style>

<a href="http://www.google.com/">foo</a><a href="http://invalid/">bar</a>