sark9012
sark9012

Reputation: 5717

Mega menu not displaying correctly

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 for this.

The overflow needs to be be possible as the menu expands.

Anyone able to help me please! THanks

Upvotes: 1

Views: 223

Answers (2)

Thamaraiselvi
Thamaraiselvi

Reputation: 21

.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

Upvotes: 0

Mr.T.K
Mr.T.K

Reputation: 2356

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>

Upvotes: 1

Related Questions