Forum Moderators: not2easy

Message Too Old, No Replies

Absolute div in a relative div - IE problem

Absolute div in a relative div - IE problem

         

kujie

9:51 pm on Feb 19, 2008 (gmt 0)

10+ Year Member



I've got an absolutely positioned div inside a relatively positioned div, but in IE the child div is breaking out of the parent and uses the body as its parent. There's a width and a height on the parent div, and all divs above the parent have position:relative and a width. It behaves as expected in FF and Safari.

The page is using XHTML 1.0 Trans and is running in Standards mode.

Thanks for any help!

<div id="container">
<div id="wrapper">
<div id="menu">
(inside is Macromedia's mm_menu, which is what is jumping out of the parent div, but is absolutely positioned)
</div>
</div>
</div>


#container {
margin-left: auto;
margin-right: auto;
width: 761px;
background-color:#ffffff;
position:relative;
}


#wrapper {
width:577px;
float:right;
text-align:left;
position:relative;
}


#menu {
position:relative;
width:538px;
height:30px;
text-align:left;
padding-left:10px;
padding-right:29px;
background-color:#318b4d;
}

penders

10:46 am on Feb 20, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



(inside is Macromedia's mm_menu, which is what is jumping out of the parent div, but is absolutely positioned)

But what exactly is the CSS for this object - may be there is something that conflicts?!