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.
Get the TD to take as much height as possible
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
either by <div valign="bottom"> or JavaScript: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?
Code: Select all
document.onload = some_func;
function some_func (e) {
obj = document.getElementById('some_id');
obj.style.top = parseInt(obj.height);
}- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Do you mean make it sit on the bottom of the screen?
There's two CSS attributes for this.
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
There's two CSS attributes for this.
Code: Select all
position: fixed;
bottom: 0;
/* or */
position: absolute;
bottom: 0;The second method puts it at the bottom of the screen when the page loads but will move with the page when you scroll