DIV to fill 100% and have scrollbar

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
jabbaonthedais
Forum Contributor
Posts: 127
Joined: Wed Aug 18, 2004 12:08 pm

DIV to fill 100% and have scrollbar

Post 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!
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: DIV to fill 100% and have scrollbar

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
designjutsu
Forum Newbie
Posts: 10
Joined: Wed Dec 08, 2010 10:17 am
Location: Philippines
Contact:

Re: DIV to fill 100% and have scrollbar

Post by designjutsu »

yeah, i agree with pickles... from what you want to achieve i'm imaging the oldies iframe or other flash.
Post Reply