Results 1 to 5 of 5

Thread: Hovering Parent to display Child (multi-level menu)

  1. #1
    User
    Join Date
    10-15-10.
    Posts
    279

    Default Hovering Parent to display Child (multi-level menu)

    Wondering if there's a way to make user's 'on action' on one I.D. or Class effect another I.D. or Class... example...

    Parent1 .level_1
    Child1 .level_2
    Child2
    Parent2
    Child2
    Child2

    If I set the CSS for my menu with 2 layers to hide level 2 and make level 2 position absolute (so all level 1 links fall into line)

    Parent1
    Parent2


    And what I want to do is have hovering onto a level 1 link and make its child links become visible again with relative positioning.

    Parent1(on hover)
    Child1
    Child2
    Parent2

    Is there a way to do this?

  2. #2
    User
    Join Date
    06-29-09.
    Posts
    271

    Default Re: On Action > Effect Another I.D./Class

    Set level_2 to display: none; remove the position: absolute, but keep it static or relative.
    On hover level_1 set level_1:hover level_2 display: block.

    That should do it

    ps, please include a (JS) solution for IE versions that do not allow hover for non anchor elements.

  3. #3
    User
    Join Date
    10-15-10.
    Posts
    279

    Default Re: On Action > Effect Another I.D./Class

    Thanks for the reply Vera,

    A problem I'm running into is having it only effect the currently hovering parent and it's children. When I set
    .level_1:hover .level_2 for display: block // .level_2 display:none it's displaying ALL .level_2 links and not just the .level_2 links of the currently hovered parent.

  4. #4
    User
    Join Date
    10-15-10.
    Posts
    279

    Default Re: Hovering Parent to display Child (multi-level menu)

    p.s. i'm utilizing the contao navigation menu for this.

  5. #5
    User
    Join Date
    10-15-10.
    Posts
    279

    Default Re: Hovering Parent to display Child (multi-level menu)

    Forget about it. Found the mootools hover menu and it works exactly how i wanted the menu to XD

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •