SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    mootools menu CSS display problem

    Hello!

    I have a Motools menu that I want to style, some menu items have sub menus that are showed when hovering over the parent li however the list of items is not displayed properly, can someone help me figure out what I'm doing wrong?

    http://ury-yolotl.com/test/menu.html

    the fourth menu item has a sub menu in which it's items also have sub menus, if you hover over them you will see that the sub menu will display only the top portion of the ul as only the height of the first child ul is used
    Do you get bothered because I do the same thing every day?
    Do you question why I do it?
    Then find something that you actually like doing!!!

    Stop thinking on what I do.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    This seems to be a javascript question because you have no css to hide and show the menu and its all done with javascript.

    The js is adding a nested div with overflow:hidden and then revealing the submenu on hover. However the element is still in the flow and taking up space and this actions automatically hides sub menus.

    Usually you would start with a fully working css menu and then layer javascript on top.

    The basics are that you set the nested ul to position:absolute and hide it off screen and then on hover bring the menu back into view while at the same time hiding any further nested menus.... and so on.

    You should use something like the suckerfish menus to start with and then layer js on top if needed.

    I can move the thread to the JS forum if you want to continue with the mootools approach.

  3. #3
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yes that would be great if you could move it however I am actually doing what you recommended, I am now working with the CSS on the main items and will be working my way down.
    Do you get bothered because I do the same thing every day?
    Do you question why I do it?
    Then find something that you actually like doing!!!

    Stop thinking on what I do.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    As you have moved on now with your other thread I'll close this thread for now but if you need it opened and moved moved to javascript then just send me a PM and I'll move it.


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
  •