开发者

CSS: Stopping div pushing content

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜