Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Menu CSS help

  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    153
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Menu CSS help

    Hi,

    I am trying to style a menu but i still get confused with proper syntax.

    Code:
    <ul class="main-nav"><li id="bp-adminbar-account-menu"><a href="http://www.eupal.eu/members/admineu/">My Network</a><ul><li class="alt"><a id="bp-admin-activity" href="http://www.eupal.eu/members/admineu/activity/">Activity</a></ul></ul>
    I want to change the hover color as well as the background and text color of the sub-menus.

    any mark-up code will be much appreciated.

    thanks in advance,
    Andy

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello neodjandre,

    ul li a:hover {color: #f00;} should make the words My Network red on hover.

    To change background and text colors, this should do the trick -
    Code:
    ul li ul li {
    background: #fff;
    color: #333;
    }
    You would probably want to add the id's and classes so the CSS would be more specific.

    For more help you'll need to post the entire code for your ul menu. What you have provided is incomplete and invalid.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •