Jump to content

setting text color for anchors that aren't hyperlinks


paulonline2501

Recommended Posts

hi everyone, im having a problem with working out how to stop text that has an anchor (with no hyperlink) from changing color when i hover over it. i've set the ancors for the whole site in my css like so (they're normally hyperlinks, the only reason i noticed this problem when i added some boomarks to pages so i could hyperlink straight to some sections in a long doc):

a, a:link, a:active{color: #990000;}a:hover{text-decoration:none; color:#990000;}

if i add an achor for the bookmark...

<a name="whatever">some text</a>

...then the anchor is treated as a all other anchors.fare enough as thats what i told it do in the css above. however i have tried to override this for my bookmarks that are always h2's like so:

h2 a{color: #666666;} h2 a:hover{color: #666666;}

however, this override is not working as i would expect. the hover part is being ignored and shows up red as defined in the first declaration. any ideas what i'm missing? you can see the page i'm testing on herehttp://www.paulyouth...d-there-css.php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...