View Full Version : Weird problem with hover links in css


C-O-R-E-Y
01-16-2003, 01:34 AM
I have the following code (inside the css on the html page of course):

a:link {
color: #A00000;
text-decoration: none;
}
a:hover {
color: #E00000;
text-decoration: none;
}
a:visited {
color: #A00000;
text-decoration: none;
}
a:active {
color: #A00000;
text-decoration: none;
}

The thing is:

Supose there is a link, i move the mous over it and the color change like it supposed to change.
The I click on it and that link will become a "visited link", the i go back and refresh the page.
Then when I move the mouse again to that link (wich is in "visited" state) the color won't change.

If i remove the part "color: #A00000;" from the a:visited, that link wich is in visited state will have the default purple color of internet explorer and i want to be the same color as the others links, either visited or not.

How can I do this?

Don't tell me to remove that as i did and add vlink="#A00000" to the body tag cuz I want a better solution cuz if I had links wtih class's like a.class1:link and so on the visited links for that class will become the color define on the body tag but that color links (in general) mya be in a different color (that's why i'm using class's, so i can have difeernt kinds of link colors for the website sections).

Please anybody help me.
thanks

Alcy
01-16-2003, 02:06 AM
It's just the order ^_^. Try this:

a:link {
color: #A00000;
text-decoration: none;
}
a:visited {
color: #A00000;
text-decoration: none;
}
a:active {
color: #A00000;
text-decoration: none;
}
a:hover {
color: #E00000;
text-decoration: none;
}

C-O-R-E-Y
01-16-2003, 11:56 AM
thanks a lot, it worked :D