[thelist] JS/DOM: height or bottom of a div?

Mark Cheng mark.cheng at ranger.com.au
Sun Aug 26 20:49:37 CDT 2001


Frank,

I may be missing something, but because you are using block level elements,
the footer will always appear below the content div if you put it after the
content div in your source code.  eg

< div id="content>content here</div>
< div id="footer> footer here </div>

if the problem is that you have absolutely positioned your content div,
there are several workarounds.  The easiest is to put the footer in the
content div itself, and set its width to 100%.

so:

< div id="content"> Insert the content here
< div id="footer"> footer contents </div>
</div>

That may not be appropriate, depending upon the design of your page, so if
this doesn't help, a URL would be good.

hth

Mark

>Frank wrote:
>>
>> I'm using CSS positioning for my site, and I want the footer div to sit
>> below the content div. Since the content div will always be
>changing sizes,
>> I'm trying to get at it's height, or it's bottom, so that I can calculate
>> where to put my footer.
>>
>> Reading the DOM 1 spec, I see that the only attribute that DIV has is
>> ALIGN. Bummer. Can someone suggest a manner in which I can find out where
>> the bottom of a given div is?
>>
>
>---------------------------------------
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt !
>


This email may be confidential and contain commercially sensitive information.  Only the intended recipient may access or use it.  If you are not the intended recipient please delete this email and notify us promptly. 
We use virus scanning software but exclude all liability for viruses or similar in this email or any attachment.






More information about the thelist mailing list