SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Menu Background Color

  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2006
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Menu Background Color

    Hi,

    How do I give the background of the dropdown menu here a color? At the moment it is transparent.
    If I set the background-color property in .menu a, .menu :visited it works but removes the various background colors of the top level menu.

    Thanks!

  2. #2
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Rockford, IL
    Posts
    2,360
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    .menu li ul{ background:#FFF;} /*fff=white, change to whatever color code you want */

    you could also do" .menu li ul{ background:inherit;}

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,749
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    Just target the nested menu and miss the top level completely.
    e.g.
    Code:
    .menu ul ul a{background:red;}
    Edit:


    Just a few seconds too slow with my reply ......

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
  •