John John
John John

Reputation: 1

Prevent changing visited anchor color

i am working on an asp.net web application , and i have defined the following inline style to color some anchor links:-

<html>
<head>
<style>
.w
{
color:white;
}
.b
{
color:#959B93;
}
</style>
</head>
<table border="1" style="position:relative;float:left">
<tr>
<th  bgcolor="#1F477C"  colspan = "4"> <a href="" class="w">Management System</a></th>
<th  bgcolor="#1F477C"  colspan = "4"> <a href="" class="b">Management System info</a></th>

but the problem is that the link color will be changed when it is visited so how i can prevent this ? and keep the original link color either white or blue...

Upvotes: 0

Views: 115

Answers (2)

Muhammad Muzamil
Muhammad Muzamil

Reputation: 1242

global settings

a:visited{
    color: yourcolor;
}

Upvotes: 0

user2384183
user2384183

Reputation:

Update your styles to override the :visited pseudo-class:

.w, .w:visited {
    color: white;
}

.b, .b:visited {
    color: #959B93;
}

You can separate these into different blocks if you want a custom color for visited links.

You might also want to do this with the :active pseudo-class.

Upvotes: 3

Related Questions