SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Remove Highlight from Drop Down Menu Main Item

    Hi

    I have a horizatonal menubar containing "About" "Events" "Customer Service" etc.

    When the user hovers over the "About" the menu, a sub-menu appears.

    However the top level menu item "About" highlights and I want it the color to stay as "Black".

    I have attached a screenshot of the issue and the css file.

    Thanks in advance for the help.
    Attached Images Attached Images
    Attached Files Attached Files

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

    Usually you would want the top item to match the dropdown like that so that you can see easily to what the dropdown refers. To remove that function then remove this code:

    Code:
    li:hover a { background: #d9d4bc; }
    If you want a hover effect on the top row anchor only then use something like.

    Code:
    #nav > li > a:hover {color:#f00 }
    That assumes your nav is called #nav of course. Note that in the attachement you posted you did not have a class or id prefix so the rules would apply to all lists in the site which is not what you want.


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
  •