-1

I am using a simple HTML selector to change the visited link color. This works in Edge and Firefox, but not in Chrome and IE. Any tips would be great.

a:visited {
  color: pink !important;
}
<a href="https://www.w3schools.com">W3Sschools</a>
<a href="http://www.wikipedia.org">Wikipedia</a>

<p><b>Note:</b> The :link selector style links to pages you have not visited yet.</p>
TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

1

When styling a pseudo-class like :visited for the <a> element, it's a good idea to style all of them explicitly, so that you don't get any stylesheet conflicts:

  • a:link
  • a:visited
  • a:hover
  • a:active

You can remember the correct order with the mnemonic: LoVe HAte

Rounin
  • 27,134
  • 9
  • 83
  • 108