...

View Full Version : a:hover color dosn't work



Haidar
07-11-2011, 05:53 AM
Thanks solved :D

kwdamp
07-11-2011, 06:21 AM
I'm not sure exactly what you're asking as I did not follow all of your instructions to see your example.

But, you have not defined a separate a:hover for the left div class. So by default it would use your basic a:hover (below). And according to my color chart that would yield a light grey.

a:hover {
text-decoration: underline;
color: #817D6F;
}

Am I missing something?

ARCLite Studio
07-11-2011, 06:29 AM
In your CSS file locate:


h4, h5, h6, a {
color: #FFFFFF;
text-decoration: none;
}

Delete the color property there or change it to another color, that is the CSS property that is causing it to turn white on mouse over.

Edit: ** On second though, just remove the "a" from the CSS property above and you should be fine. **

kwdamp
07-11-2011, 06:41 AM
Again, it's late, so maybe I'm not thinking clearly or missing something, but because he defined a:hover a:link a:visited and a:active, wouldn't the a tag there mean nothing for any of those? I thought the more specific the attribute the higher level of priority it got...


In your CSS file locate:


h4, h5, h6, a {
color: #FFFFFF;
text-decoration: none;
}

Delete the color property there or change it to another color, that is the CSS property that is causing it to turn white on mouse over.

Edit: ** On second though, just remove the "a" from the CSS property above and you should be fine. **

ARCLite Studio
07-11-2011, 06:53 AM
Again, it's late, so maybe I'm not thinking clearly or missing something, but because he defined a:hover a:link a:visited and a:active, wouldn't the a tag there mean nothing for any of those? I thought the more specific the attribute the higher level of priority it got...


Well, yes and no. It seems that according to W3 CSS Standards the ORDER in which you place pseudo classes will affect the outcome: see HERE (http://w3schools.com/Css/css_pseudo_classes.asp)

On that note, a partial quote from that page is:

Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!

Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!

Note: Pseudo-class names are not case-sensitive.

There is another issue here, to my knowledge the "a" tag is considered to be a parent of the pseudo classes and it programmatically ONLY controls the appearance of any "unvisited" link by default where as all the pseudo classes control issues about the link not addressed by the "a" tag by default.

The reason I point this out is that "a" and "a:link" both affect the same property of the object link, in this case the default color and underline (decoration), but when a CSS property is defined for the "a" tag as well as the "a:link" pseudo class, I believe the "a" tag CSS will prevail, or the order in which its placed in the CSS will prevail, I didn't take the time to test which was correct



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum