droidus
droidus

Reputation: 641

hyperlink styling

I am trying to style hyperlinks: some must be white, and some others must be normal color. Here is what I have:

<a href="http://www.mysite.com/register.php" class="normal">Register</a>

a:link {
    color:#FFF;
    text-decoration:none;
}
a:hover {
    color:#FFF;
    text-decoration:underline;
}
a:visited {
    color:#FFF;
    text-decoration:none;
}
a:active {
    color:#FFF;
    text-decoration:none;
}

.normal a:hover{
    color:#00F;
}
.normal a:link{
    color:#00F;
}
.normal a:visited{
    color:#00F;
}
.normal a:active{
    color:#00F;
}

The normal links work fine. But when I use the class=normal, the link is still white. Why are the normal links taking precedence?

Upvotes: 0

Views: 164

Answers (1)

Brezhnews
Brezhnews

Reputation: 1569

try define the class normal like this:

a.normal:hover
{
    color:#00F;
}
a.normal:link
{
    color:#00F;
}
a.normal:visited
{
    color:#00F;
}
a.normal:active
{
    color:#00F;
}

Upvotes: 1

Related Questions