Link to home
Start Free TrialLog in
Avatar of Rowby Goren
Rowby GorenFlag for United States of America

asked on

Getting Text hover to work with spanned text

Hello,

Please look at this page Test site

On the right is a menu that starts with the word on top "View all faculty"

When the mouse hovers over the links below, I would like the text to have a different color.  The text is spanned, and I am not sure how to change the hover color when the mouse hovers over the text item.

Example   <span class="menu-title">Music Education</span>

I want "Music Education" to be yellow when the mouse is over it.   And only for the span class ""menu-title"

I've tried various css but none are working.

Thanks!

Rowby
ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As a matter of interest - why are your menu items in a <ul> but the actual items are in <p> elements rather than <li> ?

Here is what you can do
First set the hover colour for the default hover state - will include the first menu item
#jux_accord-menu .menu_head a span:hover {
  color: yellow;
}

Open in new window

Now override first menu item to have colour white on hover - so it looks like there is no change when the first menu item is hovered.

#jux_accord-menu .menu_head:first-child a span:hover {
  color: #fff;
}

Open in new window

Avatar of Rowby Goren

ASKER

Thanks!  Perfect!  Rowby