开发者

CSS: Stopping div pushing content

开发者 https://www.devze.com 2022-12-23 06:51 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消