my links turn purple sometimes, probably becouse they are visited or something. I want to disable this from css.
How can i do this?
thanks in advance, yours lovely alexander
You need to define the visited property for your links.
<style type="text/css">
a:visited {color: #000000}
</style>
In CSS write:
a:visited
{
color: #f00; /*where #f00 is your hexadecimal colorcode, you can use "blue" or an RGBa value too!*/
}
Simply set a CSS style which sets the colour for <a>
tags.
a {color:blue;}
There are separate pseudo tags for a:link
, a:hover
, a:visited
and a:focus
, but unless they're being set elsewhere, you shouldn't need to specify them - if you just specify the style for a
as above, it should apply whatever the state of the element.
If the psedo styles are being set and you need to override them, then you'll need something like this:
a, a:link, a:visited, a:focus, a:hover {color:blue;}
(of course you can remove any of the above that you don't want to override)
You can use the selector a:visited.