How do you get a visited link to go back to the unvisited color? Like if I x out of the browser and come back a later day, I want it to be the original color again.

Recommended Answers

All 4 Replies

You can use the css code below to remove the effect that changes the color of a visted link.

a:visited{
    color: black;
    text-decoration: none;
}

I am not sure if you need both the color and the text-decoration lines but one or the other or a combination of both will remove that effect.

This had no effect in chrome. But in firefox it worked as the a:active selector would, reverting back to original color after the initial click.

I suppose I might need to learn javascript for this?

Thanks for the quick response by the way.

The. I sites pseudo class should have worked in Chrome as well. Feel free to post hour HTML and CSS. You should have to depend on JavaScript for this to work across common browsers.

The visited link is set according to your browser's history. You can either use it, or give it a new color using CSS. If you want different coloring depending on last accessed, then you need to do some coding and tracking.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.