Page 1 of 1

DIV to fill 100% and have scrollbar

Posted: Fri Dec 10, 2010 11:50 am
by jabbaonthedais
I need to have a page with a fixed size header and footer, and the main content of the page to fill up whatever is left so that the entire page fills 100% of the browser. And, I need the main content to have overflow via a scroll bar, instead of making the footer go down, so that the header and footer are always visible on the page. Getting a pure CSS solution to have the middle fill the page was challenging, but I could never get the scrollbar, it just pushed the footer down. Now I am trying a mixture of tables (since the filling 100% is so simple) and css, but still no luck. Is this possible?

Here is my test page:
http://www.ratchetmedia.com/test.htm

Thanks!

Re: DIV to fill 100% and have scrollbar

Posted: Fri Dec 10, 2010 2:26 pm
by pickle
Would it matter if the scrollbar filled the entire right side of the window, but the header and footer remained in place? If not, you could just set them to position:static.

Re: DIV to fill 100% and have scrollbar

Posted: Fri Dec 10, 2010 7:50 pm
by designjutsu
yeah, i agree with pickles... from what you want to achieve i'm imaging the oldies iframe or other flash.