Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One last question...

Status
Not open for further replies.

redletterrocko

Programmer
Aug 8, 2005
53
US
[afro]
One last question. I've got my site working well now, except I would like the footer to go all the way down to the bottom of the screen if the page doesn't go all the way to the bottom, but if the page is long, I want it to be at the bottom of the html. Anyone know a good tutorial for that? I've seen a few that make a hard footer, but not one that soft.
 
It is not really that straightforward and IMHO not really worth it. I like if the page is fluid and I don't have to look way down to see a tiny speck of footer information. But that is just me.

If you want to do it, you will need to set the html and body height to 100%, work with absolute positioning to position your header and footer, use IE hacks to work around IE's lack of support for min-height attribute and its wrong interpretation of height. If you still want to do it, we can get into the details, but I would advise against it.
 
Following on from Vragabonds comments... in my experience, when aiming for consistency across browsers - doing this kind of thing will require you force IE (Win) into quirks mode (by placing a comment or something on a line directly before the doctype declaration - this is ignored by all browsers except IE which then uses quirks mode instead of standards mode).


Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
If you chose to go into quirks mode you would be better off with a table instead of css hacks. IMHO
Code:
<table border="1" style="width:100%;height:100%">
<tbody>
<tr><td>body</td></tr>
<tfoot style="height:100px">
<tr><td>footer</td></tr>
</table>

However you could improve the look of your known short pages just by giving the content div a pixel height.

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top