a:visited over-ruleing a:hover (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets and Accessibility



Message


Chimpanzee -> a:visited over-ruleing a:hover (5/22/2005 19:32:25)

Hi everyone.

I'm new to CSS but i am really starting to see it's benefits.

I am having one problem though:
I have specified hyperlink appearanced in CSS but on the page they don't seem to work in some cases. These are the entities i have customised:

a:hover     { color: #6C0000; text-decoration: underline }
a:link         { text-decoration: none; color: #2E2E2E }
a:visited    { text-decoration: none; color: #2E2E2E }
a:active     { text-decoration: none; color: #4A414A }

It seems that after a hyperling becomes visited it ignors the hover effect. Either that, or the a:visited tag is over-ruleing the a:hover tag.

Can someone please help asap.

Thanks.




Kitka -> RE: a:visited over-ruleing a:hover (5/22/2005 20:21:24)

Hi,

Welcome to OutFront forums!


quote:

It seems that after a hyperling becomes visited it ignors the hover effect. Either that, or the a:visited tag is over-ruleing the a:hover tag.


I think you are on the right tack there.

The links need to be expressed in a definite order e.g.

a:link { text-decoration: none; color: #2E2E2E }
a:visited { text-decoration: none; color: #2E2E2E }
a:hover { color: #6C0000; text-decoration: underline }
a:active { text-decoration: none; color: #4A414A }

a:hover must come after a:link and a:visited in the definition in order to be effective.




Tailslide -> RE: a:visited over-ruleing a:hover (5/23/2005 2:29:27)

Spot on Kitka

Remember: LoVe and HAte with the capitals representing the selector initials




Chimpanzee -> RE: a:visited over-ruleing a:hover (5/23/2005 6:03:20)

Thanks.

That suggestion has worked on most of the links but not on a couple. I can't think what the problem is.

Thanks




Kitka -> RE: a:visited over-ruleing a:hover (5/23/2005 6:29:23)

quote:

That suggestion has worked on most of the links but not on a couple.


If you post a URL of the problem links/pages we might be able to help.




c1sissy -> RE: a:visited over-ruleing a:hover (5/23/2005 17:43:43)

Before you post a link, let me make a few suggestions.
First, make sure you validate your xhtml/html.
Second, make sure you validate your css.

You just might find after you do this that everything is ok.

Sometimes, something that we have done previous to where the styles aren't working could be something that we did up farther in the styles.

If you can't post a link, post the css, and some of your html/xhtml.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.736328E-02