html css links visited

3.3k Views Asked by At

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

5

There are 5 best solutions below

0
On BEST ANSWER

You can use the selector a:visited.

a:visited {
  color : black;
}
0
On

by using the visited pseudo-class

0
On

You need to define the visited property for your links.

<style type="text/css">
a:visited {color: #000000}
</style>
0
On

In CSS write:

a:visited 
{
   color: #f00; /*where #f00 is your hexadecimal colorcode, you can use "blue" or an RGBa value too!*/
}
0
On

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)