Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

DropDown Menu won't to display on hover

DropDown Menu won't to display on hover

Problem

Hello guys I have this drop down menu:

with this css:

#menu{background:#9c7d9e; padding:10px;}

#container{
    width: 550px;
    height: 150;
    border: 1px solid #c5a0b7;
    margin: 0 auto;
    display:none;
}

#mainContainer.dropDown:hover ul{
  display: block;
}

.col1{
float:left;
    margin:5px 20px 0px 20px;
    border-right:1px solid #eaeaea;
}

h3{
width:50px;
border-bottom:1px solid #ccc;
margin-bottom:5px;
  }

a{
text-decoration:none;
padding:5px 0;
}

Is not an ordinal menu because instead of hidden ul, I use a div with other divs inside that contain uls but the behavior should be the same when cursor pass over main li from menu should display container div

I dont want to change html structure because I need the menu to be designed exactly how it is.

fiddle: http://jsfiddle.net

Problem courtesy of: BurebistaRuler

Solution

You're addressing the wrong element after :hover. http://jsfiddle.net/RwtHn/1419/

using a div inside an li is frowned upon.

Solution courtesy of: besluitloos

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

DropDown Menu won't to display on hover

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×