#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Exclamation CSS drop down menu: submenus to remain in place


    I'm working on a drop down menu that's entirely in CSS, and since it contains several levels and some go below the visible part of the page needing scrolling down (not good) - I need to have the sublists remain in place when the mouse is no longer over. Is there an easy way to do that without involving Javascript? Or if that is needed, how exactly? Please help!!! Thank you!
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,124
    Rep Power
    4309
    Welcome to DevShed Forums, katezr.

    To make the menus stay open, you would need JavaScript. However, I would strongly suggest that any drop down menu that long is a poor use of a drop down menu. For one thing, you don't want to overwhelm people with too many choices. Remember that most people will not read all of the items.

    Anyway, one solution would be to split it into multiple columns, but I would encourage you to see if you could find a better solution.
    Spreading knowledge, one newbie at a time.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0
    Tell me about it... but that's how the client wants it. Another issue is, how do you make the new submenu level show up starting from the very top, at top level with the 1st menu column (not from where the submenu item is)? That should be possible within the CSS but I don't remember how to define that position... Thanks again!
    k

    Originally Posted by Kravvitz
    Welcome to DevShed Forums, katezr.

    To make the menus stay open, you would need JavaScript. However, I would strongly suggest that any drop down menu that long is a poor use of a drop down menu. For one thing, you don't want to overwhelm people with too many choices. Remember that most people will not read all of the items.

    Anyway, one solution would be to split it into multiple columns, but I would encourage you to see if you could find a better solution.

IMN logo majestic logo threadwatch logo seochat tools logo