Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Pseudo Codes for the a tag!

Status
Not open for further replies.

JProg

Programmer
Apr 4, 2002
88
JP
Hi Everyone,

I am really getting into this forum today! My question is about the CSS pseudo class that has been designed for the a tag. I am familiar with a:hover, etc.. however I have a little challenge with my web page.

I am finding that when a link is clicked it takes on the appearance of having been visited (a:visited), which is cool, but when I run the mouse over the previously visited link the colour does not change back to that dictated by hover.

I am finding that the font style changes as requested from normal writing to italic, but the colour will not budge.

If anybody knows how to remedy this please let me know.

Thanks

Regards

David
 
David,

The a tag pseudo-classes must be defined in the correct order:

A:link
A:visited
A:hover
A:active

Do you have yours in this order? If not, suggest swapping them around.

If, for example, you had hover before visited, then visited would always override hover, and you'd not see your hover style after a link was visited (sounds like just what you're describing).

You can read more about this here:


Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top