Forum Moderators: not2easy
The site is for multiple users, so when they create content, it is contained. However, if they use an absolute DIV, they can position it outside of the main body. The absolute divs won't nest for some reason. I've tried ending the header with an open div and with an open table. Works great for normal content, but the absolutes still bust through! Any thoughts? Thanks in advance!
e.g.
CSS
.clear {
clear: both;
}
#myDiv {
clear:both;
width:100%;
min-height: 250px;
/* etc */
}
HTML
<div id="myDiv">
... contents
... contents
</div><div class="clear"></div>
<div id="myNextDiv">
... contents
... contents
</div><div class="clear"></div>
<div id="anotherDiv">
... contents
... contents
</div>
I believe the problem is that you don't have "containing block" established for your wrapper div, meaning that positioning would be done relative to the base of the page, and not the div.
To make the div a containing block, just include "position:relative" in it's style. If you also have problems with the positioned divs leaking past the sides (overflowing), use "overflow:hidden".
[edited by: Xapti at 2:59 am (utc) on Oct. 18, 2007]