Page 1 of 1
Get the TD to take as much height as possible
Posted: Mon Oct 03, 2005 9:08 am
by pilau
I tried to set the height of the TD (it's id is container_td) to 100% on CSS, and it won't work.
What could be preventing me from doing so?
By the way I am using DTD loose.
Posted: Mon Oct 03, 2005 4:58 pm
by Chris Corbyn
From what I remember using tables for layouts, it wasn't (isn't) permitted to set TD heights in percentage. Tables aren't made for layouts so it's a non-standard idea. Maybe I'm wrong (I often am). XHTML (CSS and <DIV> elements) should get you there though

Posted: Tue Oct 04, 2005 12:59 am
by pilau
Ok. Maybe you'll know the answer to this one: How can I "snap" a DIV (or a TR) to the bottom of the window?
Posted: Tue Oct 04, 2005 6:31 am
by foobar
pilau wrote:Ok. Maybe you'll know the answer to this one: How can I "snap" a DIV (or a TR) to the bottom of the window?
either by <div valign="bottom"> or JavaScript:
Code: Select all
document.onload = some_func;
function some_func (e) {
obj = document.getElementById('some_id');
obj.style.top = parseInt(obj.height);
}
I got this off the top of my head, so it can be wrong, but it should be something roughly similar.

Posted: Tue Oct 04, 2005 7:21 am
by Chris Corbyn
Do you mean make it sit on the bottom of the screen?
There's two CSS attributes for this.
Code: Select all
position: fixed;
bottom: 0;
/* or */
position: absolute;
bottom: 0;
The first method makes the div stay there even when you scroll up and down. It behaves like the second one in IE though (bug).
The second method puts it at the bottom of the screen when the page loads but will move with the page when you scroll