I'm trying to implement a CSS menu and am having a problem with the menu pushing the other content/divs down when the menu ex开发者_JAVA百科pands.
http://www.confetti.ie/index2.aspx
Can anyone tell me what CSS I need to stop the main body content being pushed when the menu expands?
The keyword is the CSS property position: absolute
. It makes elements "float" over the other content. Absolutely positioned menu elements won't push the page content.
Use position: absolute
for the one you want to be over and position : relative
for the one don't want to move
Use position: absolute;
to throw the element (sub menu container) out of the document flow.
精彩评论