Horizontal Menu - CSS [closed]

0

I'm trying to learn how to work with horizontal menus in CSS. I'm starting and so I'm having a silly question and I did not find anything on the internet similar to my question (Maybe I do not know the correct terms for the problem).

My problem is that all of my sub-menus are aligning underneath the first element of the main menu. I put here in JSFIDDLE the HTML and CSS that I did.

I hope someone can help me.

    
asked by anonymous 23.07.2015 / 21:58

1 answer

0

I did not understand correctly why (I did not keep looking), but I need to float the "parent" menus:

.menu > ul > li {
    float:left;        /* <- Adicione essa propriedade */
    list-style: none;
    text-align: center;
    margin: 0;
    padding: 0;
}

JSFiddler

    
23.07.2015 / 22:08