Grow your CSS skills. Land your dream job.

Drop Down menu problem

  • # March 11, 2013 at 2:59 pm

    I am using a free wordpress theme ,named Pitch (http://siteorigin.com/theme/pitch/) . I redesign the menu bar , so that the background of first element of the menu bar will show an image (the logo). To do so , I just add a simple block of code

    ul#mainmenu-menu li.menu-item:first-child {
    background:url(images/logo.png) no-repeat ;
    text-indent:-9999px;
    width:200px;

    border:none;
    }
    ul#mainmenu-menu li.menu-item:first-child a:hover {
    background:none;

    }

    But the problem is , that image also appear in first element of the dropdown item too . Like the image

    What did I do wrong , How can I fix this ?

    Here is the complete CSS code http://pastebin.com/edsYrqWF

    Plz help me out

    # March 11, 2013 at 3:24 pm

    ul#mainmenu-menu > li.menu-item:first-child

    And now it points only to the direct child, not any child within.

    # March 11, 2013 at 3:46 pm

    thanks , It works

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".