PDA

View Full Version : CSS Hover problem



kiorajulie
06-29-2006, 06:33 AM
This is probably a really easy fix, but I just can't seem to get it to work. I have set the link color to change on hover but it just isn't working. I added some drop down menu code to some of the links as well and on those the hover change is working. Not sure what I did wrong.

http://www.centaurusinv.com/indexNew.html

A:link { font-size: 11px;
font-family: Arial, Helvetica, Sans-serif;
color: #797979;
text-decoration: none;
}

A:hover { font-size: 11px;
font-family: Arial, Helvetica, Sans-serif;
color: #B20838;
text-decoration: none;
}

A:visited { font-size: 11px;
font-family: Arial, Helvetica, Sans-serif;
color: #797979;
text-decoration: none;
}


#dropmenudiv{
position:absolute;
border:1px solid white;
border-bottom-width: 0;
font:normal 12px Arial;
line-height:18px;
z-index:100;
}

#dropmenudiv a{
width: 100%;
display: block;
text-indent: 3px;
border-bottom: 1px solid white;
padding: 1px 0;
text-decoration: none;

}

#dropmenudiv a:hover{ /*hover background color*/
background-color: E5E5E5;
color: B20838;
}

jscheuer1
06-29-2006, 07:04 AM
The :hover pseudo class must follow the :visited and :active pseudo classes (when either or both are used) in the stylesheet. Otherwise, one of those (:visited or :active) will take precedence.