|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I'm trying to setup an external style sheet that will display links as one color w/no underline in all stages except hover--in which it will be the same color, but underlined. My CSS code is listed below, as well as my HTML code:
CSS---> A.white:link { COLOR: #FFFFFF; TEXT-DECORATION: none } A.white:active { COLOR: #FFFFFF; TEXT-DECORATION: none } A.white:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline } A.white:visited { COLOR: #FFFFFF; TEXT-DECORATION: none } HTML---> <a class=white href="contact.php">Contact Us</a> However--when I visit a link, the link assums the properties of visited when I hover of it. I think I'm doing something wrong. Any ideas?
__________________
Matt |
|
#2
|
|||
|
|||
|
Hello,
the same thing happened to me. . .The links would not hover after being visited once. I assumed it was a bug in my browser (ie5.5) might have to work around it with JavaScript. . .
__________________
Support the mob or mysteriously disappear!! |
|
#3
|
|||
|
|||
|
Put your declaration for a:hover after your declaration for a:visited. Always put the :hover last, because that's the one you want to take precedence.
|
|
#4
|
|||
|
|||
|
When using css it is generally the styandard to use pseudo classes for links in the following order:
link--visited--hover--active (or "love...ha!") CSS---> A.white:link { COLOR: #FFFFFF; TEXT-DECORATION: none } A.white:visited { COLOR: #FFFFFF; TEXT-DECORATION: none } A.white:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline } A.white:active { COLOR: #FFFFFF; TEXT-DECORATION: none } This should solve the problem. Peter |
|
#5
|
||||
|
||||
|
bricker42's idea of placing the hover after visited worked. Thanks!
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Need help w/using CSS for links |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|