superfish - subemenu hover text color

Permalink
I am trying to change the hover text colour of the the submenu items.

The current color is #CCCCCC inherited from parent.
This needs to be changed to #fffff

I have tried .sfmenu li li a:hover { color:#ffffff; }

This didn't work.

URL :http://www.zambeel.ca/testc/paws/index.php/media/...

Tags:

View Replies: View Best Answer
GregJoyce replied on at Permalink Reply
GregJoyce
looks like you have an extra li in there. I think you want ul.sfsubmenu li a and that should get the submenu.
zambeel replied on at Permalink Reply
Hi GregJoyce,

I tried your suggestion, that didn't work.

I also tried ul.sf-menu li a, ul.sf-menu li a:hover

This superfish menu is quite difficult to customize than other implementations.
MattWaters replied on at Permalink Best Answer Reply
MattWaters
To do this, you'll need to disable the !important flag where these colors are set in view.php. Look for line 24 and put /* css comments */ around !important, like so:

#sf-menu<?php   echo $bID?> .sf-menu a, #sf-menu<?php   echo $bID?> .sf-menu a:visited, #sf-menu<?php   echo $bID?> .sf-menu a:link, #sf-menu<?php   echo $bID?> .sf-menu a:hover{ color:<?php   echo $controller->menuColorTxt ?> /* !important */ }


Then you'll be able to add something like this to your css:

.sf-submenu li a:hover {
   color: #fff !important;
}


Otherwise you'll have a hard time overriding the first link hover color. One thing to keep in mind is that your theme's styles may need to be adjusted so that it doesn't interfere with SF menu colors. That can happen sometimes if a theme is coded without much care for specificity.
zambeel replied on at Permalink Reply
Hi Matt,

Thanks so much for your response.

I just managed to do the same.

Removing the !important from the location you specified worked.
MattWaters replied on at Permalink Reply
MattWaters
Cool! Glad you found a solution. I'm going to mark this issue resolved.