The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Change Active Link Color Reply To: Change Active Link Color


I can think of two different ways to accomplish this:

  • If the user can back the background color, allow them to choose the link colors as well: link, hover, active and visited.
  • If you don’t want to do that, then maybe use javascript to find the complimentary colors

Then add the :active color inside a style. Something like this:

var activeLink = "#d00",
  styleElm = document.createElement("style");
styleElm.textContent = "a:active { color: " + activeLink + "}";