Click to See Complete Forum and Search --> : div positioning and expanding content


kbc1
02-16-2009, 09:09 AM
Hi all

Need help or advice on the following issue.

I have some mark up (see below) which I have a #wrapper DIV which is 100% in height, and I then inside have an absolutely positioned #textcontent DIV and the height of this DIV is decided by it's content taken from my database.

See my Markup example here:


<div id="wrapper">
<div id="textcontent">
<!-- my dynamic content here -->
</div>
</div>
<div id="footer"></div>


The problem I am having is that, when I add background colours (for example to my DIV's so I can see what's going on in my browser), the #textcontent DIV goes past the bottom of the #wrapper DIV and therefore my #footer DIV sits behind my text content in #textcontent DIV.

I also have other DIV's inside my #wrapper which are positioned either relatively or absolutely hence the use for absolutely positioning my #textcontent DIV.

Is there a away of making sure my #wrapper DIV extends to the same height as my #textcontent DIV if it expands?

Thanks for reading.

Doug

cgig
02-16-2009, 11:00 AM
Hi Kbc1,
as far as know you can try adding your footer inside of your #wrapper or try the using clearit from the link below:
http://www.webdeveloper.com/forum/showthread.php?t=202291
hope this helps

kbc1
02-17-2009, 02:52 AM
Thanks, but already tried it. I'll plod on..