An unvisited link is underlined and blue. A visited link is underlined and purple. An active link is underlined and red.
If it's deselected (by default), you are good. Go to Step 2. Step 2: Now go to Content > Fonts & Colors > Colors. In the “Colors” windows, change the color of “Visited Links:” to your desired one, select Always in the drop-down menu, and click the “OK” button to save your changes.
Using different colors for visited and unvisited links makes your site easier to navigate and thus increases user satisfaction.
Right-click on the icon and select Options to change background colour, text colour, links colour and visited links colour. Once your options have been set, you can click on the icon to apply/remove your colour options.
a:link{color:inherit}
a:active{color:inherit}
a:visited{color:inherit}
a:hover{color:inherit}
Hell yes.
I needed this because some text links (as opposed to image links) were a major part of my project's main menu, so I want them MY colours, not browser colours!
Each link was enclosed in a p tag group whose class had a particular colour (MY colour) set in CSS.
Danny Robers script works for me in Firefox and Chrome (not sure about IE).
FWIW, the special value HyperlinkText would have been the "standard" way to do what you want, but it was dropped from CSS3 sometime in spring 2003.
It looks like Firefox is the only browser that started implementing it, because the following works for Firefox:
a:visited { color: -moz-hyperlinktext; }
I don't think there's a pure CSS solution. Usually you would pick a color, and set both a:link and a:visited that same color.
I tried {color: inherit} but that was useless.
This jQuery solution works great though.
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"
type="text/javascript"></script>
<script type="text/javascript">
$(function(){
var normalColor = $('a:link').css('color');
$('a:visited').css('color', normalColor);
});
</script>
</head>
<body>
<a href="http://www.google.com">Google</a>
<a href="nowhereyouvebeen">No where you've been</a>
</body>
</html>
There is no way to do this using CSS. The browser indicates that a link has been visited based upon a database entry only it knows about, and then uses default colours specified in the specific browsers configuration.
CSS physically just cannot obtain the colour of something on the page. That is just the way it is. The only way is to use javascript like Danny Roberts' answer.
The reason I think that his answer is not working correctly is that $('a:visited')
just selects all the visited links at that point in time and then the colour is changed for them.
What you need to do is watch for click events and re run the code each time:
var normalColor = $('a:link').css('color');
$('a').click(function() {
$('a:visited').css('color', normalColor);
});
I don't think there is a pure CSS way of achieving this. I think you would need to use JavaScript to get the color of the a and then set a:visited to that color and this probably wouldn't work in all browsers unless there was an a{color:#dea} specified.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With