SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    634
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    css drop menu...should be easy but.

    using the class assigned by wp.

    so i have a .menu & a .sub-menu, using this code, but so far have been unable to make the sub-menu work. Advice anyone, please?
    thx
    D

    Code:
    #menu-primary{
    margin-left: 20px;
    }
    .menu  ul{
    border-radius:0 0 20px 20px;
    list-style-type:none;
    
    }
    
    .menu  li{
    position: relative;
    line-height: 30px;
    float: left;
    list-style-type:none;
    
    background-color: #000099;
    }
    
    
    .menu  li a{
    color:#fff;
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    }
    
    .menu li a:hover{
    text-shadow: 0px 0px 9px rgba(255, 255, 255, 1);
    }
    .sub-menu li:hover{
    display:block;
    list-style-type:none;
    }
    
    .sub-menu ul li{
    float: none;
    color: #fff;
    background-color: #000099;
    list-style-type:none;
    }
    
    .sub-menu li{
    position: absolute;
    display: none;
    }

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,601
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    The problem is obvious! You have no HTML!

    You'll want the sub ul to be position: absolute, but we need to see the HTML to advise.

  3. #3
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    634
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    menuIssues02.jpgha yes...if only it was that easy.
    am using wp :-)
    but attached a screenshot.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,601
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    There are no sub lists shown there. Maybe I'm missing what you are asking.

  5. #5
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    634
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    here let's try this new one.menuIssues03.jpg

  6. #6
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    634
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    GOT IT!!!!
    so happy

    here are the two bits that fixed that.
    .menu li li{
    float:none;
    display: none;
    }

    .menu li:hover ul li{
    display: block;
    }

    I just ignored the .sub-menu name & addresses the ul & li with the code.


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
  •