SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Jul 2003
    Location
    england
    Posts
    822
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question Keep Parent Hover State While Submenu is Hovering

    I have a menu when you hover over a parent item and proceed to select a submenu item, the parent loses its hover state (instead of the link text being white, it goes to grey). How may I fix this?

    Thank you.

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,624
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Well, show us your current attempt and we will work from there .
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  3. #3
    SitePoint Guru
    Join Date
    Jul 2003
    Location
    england
    Posts
    822
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Okay, my bad. Brainfart: here is the link.

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

    Set the colour when the list is hovered:

    Code:
    ul.menu > li:hover > a {color:#fff}
    If you need ie6 support then you would need to do it in two stages as it doesn't understand the child selector.
    e.g.
    Code:
    ul.menu  li:hover a {color:#fff}
    ul.menu li li:hover a{color:#9d9fa2}
    Of course you'd need to substitute the hover routine instead of the li:hover as it doesn't understand that either. However as you are using the xml declaration then Ie6 is in quirks mode anyway and completely broken.

    In IE7 the menu goes under the image below and you need to set a z-index on the main parent of the ul.

    Code:
    .moduletablemainmenu{position:relative;z-index:999}


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
  •