You can change
#nav li#parent:hover {
to
#nav li#parent a:hover {
Also you could put:
#nav li#parent:hover { background-color:#CCD9FF; border-color: #99B3FF; }
To make it look consistent. http://jsfiddle.net/Luryf/4/
update:. It seems also necessary to move border-*
and border-radius-*
to your own. (from parent
to parent a
) http://jsfiddle.net/Luryf/8/
from
#nav li#parent{ background-color:#FFF; border-top-right-radius:5px 5px; border-top-left-radius:5px 5px; -moz-border-top-left-radius:5px 5px; -moz-border-top-right-radius:5px 5px; -webkit-border-top-left-radius:5px 5px; -webkit-border-top-right-radius:5px 5px; border-top:1px solid #FFF; border-right: 1px solid #FFF; border-left:1px solid #FFF; } #nav li#parent:hover{ background-color:#CCD9FF; border-color: #99B3FF; }
in
#nav li#parent { background-color:#FFF; } #nav li#parent a { border-top-right-radius:5px 5px; border-top-left-radius:5px 5px; -moz-border-top-left-radius:5px 5px; -moz-border-top-right-radius:5px 5px; -webkit-border-top-left-radius:5px 5px; -webkit-border-top-right-radius:5px 5px; border-top:1px solid #FFF; border-right: 1px solid #FFF; border-left:1px solid #FFF; } #nav li#parent:hover a { background-color:#CCD9FF; border-color: #99B3FF; }
source share