• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

li menu

I have a menu made out of

<ul>
<li>
    <ul>
            <li></li>
      </ul>
</li></ul>

Open in new window


when I hover and the submenu opens,  the hover affect happens on the second ul/li and the main tab doesn't highlite anymore.
is there a way to keep the hover on the main li and on the sub li?
0
rivkamak
Asked:
rivkamak
  • 3
  • 2
1 Solution
 
COBOLdinosaurCommented:
Show us your CSS or post a link to the page please.

Cd&
0
 
rivkamakAuthor Commented:
0
 
COBOLdinosaurCommented:
Try #nav ul:hover {background:whatever you want}

You also have a problem with the menu going behind other elements.  you should add a z-index to the ul with a high enough value to be on top.

Cd&
0
 
rivkamakAuthor Commented:
If I do ul:hover , the whole ul highlites.
I want just the li that is on the second ul to have a hover state
0
 
COBOLdinosaurCommented:
I don't follow.  I you are wanting to an li that is not being hovered to show hover when another li is being hovered it does not sound like the user is going to understand what you are doing.  AFAIK the standards still do not include a way to reference a parent or ancestor; though it has been proposed an and rejected several times because it would more than double the time required to parse CSS.

Cd&
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now