Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS: Stopping div pushing content

Tags:

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 expands.

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?

like image 767
Melt Avatar asked Mar 13 '10 15:03

Melt


People also ask

How do I make DIVS not push other elements?

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.

How do I push a div to the front?

Use the CSS z-index property. Elements with a greater z-index value are positioned in front of elements with smaller z-index values. Note that for this to work, you also need to set a position style ( position:absolute , position:relative , or position:fixed ) on both/all of the elements you want to order.


1 Answers

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.

like image 73
Pekka Avatar answered Oct 02 '22 22:10

Pekka