Jump to content

100% variable page height


michaellunsford

Recommended Posts

Okay, here's the basic idea:

[img]http://www.virtual-showcase.net/phpfreaks/layout.gif[/img]

So far everything works, EXCEPT, making the page 100% minimum height. I had previously floated a 100% high DIV 1px on the left (or right), but the 100% wide DIV's don't play fair in IE. Another challenge with the privious design was making the legal stuff always appear just above the footer.

Another try using position:absolute (cringe) for the bottom sections resulted fine if the page didn't combine to take up more than 100% height. If it needed to stretch past 100%, though, the absolute stuff just stayed "fixed" to that spot on the page, and the content kept going underneath it.

So, the new design (pictured above) seeks to remedy this with a white-space buffer. But, how to make that buffer smart enough to know that it needs to have a height of 100%-117px-10px-10px-$variable-$variable?

confused yet?
Link to comment
Share on other sites

if you want the two side divs to be 100% high then you are out of luck. try google for faux columns. If its just the page you want to be !00% high the just have this in your style sheet.

html
{
height: 100%
}

I often use 101% so that Firefox always has the scroll bar other wise you get that annoying litt;le shift left when a page is longer than the view pane.
Link to comment
Share on other sites

Well the only way you could get the footer at the very bottom is absolute positioning - which is to be avoided as still so many use IE6 and that just likes to decide what it thinks it should do with absolutel positioned elements instead of what you want to do.

Dare I suggest that you should use a site design that doesn't care how high teh page is? If it IS an issue the I suggest you give the body text a fixed height and an scroll bar - that way your page will look something liek what you want.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.