#1
  1. meester luva luva
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Posts
    2,715
    Rep Power
    30

    CSS only drop down menu.


    I have been tasked with building a CSS drop down menu system. I have worked out I can use a hover event to invoke the drop-downs (and hide them again). However. How would I invoke one and keep it visible if they went down to the sub-menu rather than just disappearing because they left the element the hover is applied to?
  2. #2
  3. fork while true;
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2005
    Location
    England, UK
    Posts
    5,528
    Rep Power
    1055
    code please.
  4. #3
  5. Anal Purist
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2005
    Location
    Bob's Auto Parts...
    Posts
    829
    Rep Power
    85
    You will find that IE doesn't recognise the :hover pseudo-class (all other browsers do...) and you'll need a smidge of JavaScript to fix that.

    May i suggest you take a look at http://htmldog.com/articles/suckerfish/dropdowns/ - I swear by this method as it is interoperable, accessible and search engine friendly.

    Comments on this post

    • Porky agrees : Nice link :D
  6. #4
  7. meester luva luva
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Posts
    2,715
    Rep Power
    30
    Originally Posted by LinuxPenguin
    code please.
    I said I have been tasked with this. I can't provide code for something I have not started. Besides. The question I asked does not require a code example.
  8. #5
  9. I have a red lunch bag
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jan 2005
    Location
    The armpit of Niagara
    Posts
    3,115
    Rep Power
    344
    Originally Posted by Grafmix
    You will find that IE doesn't recognise the :hover pseudo-class (all other browsers do...)
    Just a clarification: IE supports :hover only on anchor links, but nothing else (i.e. a:hover works, but nothing else).
    Web Design Tips - Posting and You

    If I've been helpful, and/or you're really nice, consider buying something from my Amazon.com wishlist.
    • There is no room for pride when trying to be the best at what you do.
    • Friends don't let friends use bad code.
    The club is dead.
  10. #6
  11. Anal Purist
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2005
    Location
    Bob's Auto Parts...
    Posts
    829
    Rep Power
    85
    Sorry - that's what I meant.

    Comments on this post

    • cybersaga agrees : I figured...
  12. #7
  13. meester luva luva
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Posts
    2,715
    Rep Power
    30
    I don't mind assigning hover to an anchor. I just want to stop it disappearing if they leave the hover point for an item on the drop down.
  14. #8
  15. Cunning Linguist
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    I used to live at home, now I stay at the house
    Posts
    10,166
    Rep Power
    2043

IMN logo majestic logo threadwatch logo seochat tools logo