Thread: Height Issue
View Single Post
  #9 (permalink)  
Old 01-24-08, 06:45 PM
darren132 darren132 is offline
Newbie Coder
 
Join Date: Oct 2007
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Walkere View Post
Aye, definitely possible. Just worked out a sample.

Here's the basic idea.

Create a container div - 100% height.

Create three divs inside that container div - header, content, and footer. The height and top/bottom padding on these should work out to the full page height (which oddly enough is only 95% in the example I made).

Set the entire page to overflow: hidden and then set the #content div to overflow-y: auto. This will create a scroll bar if the content in #content is ever taller than the visible box.

I don't think it's quite perfect (for example I haven't figured out how to get the header and footer to have fixed heights while giving the content a height relative to the window size)... but it's a step in the right direction.

Good luck,
- Walkere
It's a good try, but still doesn't work quite right. Like you said the header and footer don't stay a fixed height. You also start getting like a gray footer at the bottom of the blue footer when you minimize the browsers.
Reply With Quote