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
  1. #1
    New Coder
    Join Date
    Oct 2008
    Location
    Ireland
    Posts
    40
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Wordpress Child Menu Dropdown CSS

    Have been trying to get my child menu to appear underneath the parent menu item via CSS, but no joy. The 'Breed' button on this site has a child item 'Performance', but not sure what CSS I need to get it appearing directly under 'Breed'. Any help would be appreciated.

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    Have a try with:

    Code:
    #nav-primary {
        clear: both;
        width: 906px;
        z-index: 2;/* make sure dropdown appears on top of slideshow*/
        position: relative;
    }
    
    #nav-primary li {
        float: left;/*necessary for formatting*/
        position: relative;/*set start point for the absolute positioning of the dropdown*/
    }
    
    #nav-primary ul ul {
        display: none;
        list-style: none outside none;
        position: absolute;
        left:0;/*position dropdown in line with the parent li*/
        top: 100%;/*and underneath it*/
    }
    Use the W3C HTML Validator and CSS Validator to check your code and Firebug to see what css is applied to an element
    Read Steve Krug's book Don't Make Me Think - essential reading on web usability
    I don't recommend much, but I do recommend Clook for UK web hosting


  •  

    Posting Permissions

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