I have built a dropdown/ mega menu that works perfectly when placed in the body tags.
However, I want to place it within a specified div.
The code for the div is
.menu{width:100%; margin:0 0 50px 0; background-color:#D5D5D5;}
When I place the menu within this, the background colour disappears!
What I want is a grey bar with width 100% but then the menu sitting within 960 width. I assume I will need two divs f开发者_运维知识库or this.
The overflow needs to be be possible as the menu expands.
Anyone able to help me please! THanks
You have to place the
<div style="clear:both"></div>
end of the ul list
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<div style="clear:both"></div>
.menu{width:100%; margin:0 0 50px 0; background-color:#D5D5D5;} .menu ul { margin:0px; padding:0px; } .menu li { margin:0px; padding:0px; display:inline; }
- asfafa
- asfafa
- asfafa
- asfafa
I thing this will solve your problem
精彩评论