Jump to content

Dropdown menu and layers


DonAndress

Recommended Posts

Hello.

 

I'd like to create a dropdown menu in CSS and it kind of works but now I have a problem with height of the DIV.

There is a main DIV called Container (1000px of width and no height; this one is supposed to contain everything on the webpage), inside I have another DIV called Logo (300px width and 100px height), another inline DIV called Menu which is localed on the right and it has 700px width and 100px height, below there is another DIV called Content with 1000px width and no height (for the actual page content).

 

Now, the dropdown menu always stretches DIV Menu in height when the list pops up.

I tried setting Container as z-index = 1 and Menu as z-index = 2 but it doesn't work, Container disappears completely.

 

How to resolve this issue?

I'd like to make dropdown list kind of overlay everything else that is below.

Link to comment
Share on other sites

Are you using position: absolute for submenu ul elements, position: absolute elements are taken out the flow with other elements, they occupy no space, other elements will fill the space they would normally occupy, this is the normal method to prevent this happening.

 

EDIT: just side note, http://w3schools.invisionzone.com please remove users advertising on w3schools forum, you are usually quick to take out these annoying people who just want to advertise, WAIT!.... its you! bad, bad, bad.

Thank god for adblock plus, that all i can say.

Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...