You need only CSS. The following code will make a 100px high header, a 50px high footer and a div called "content" in the middle that will fill the rest of the page. The whole thing will take all the available space inside the viewport. If you resize the browser window, the page will scale accordingly.
If there's enough stuff in the "content" div you'll get a scrollbar inside it. The scrollbar will not cover any part of the header or the footer, it will be inside the "content" div.
<div id="header"></div>
<div id="content"></div>
<div id="footer"></div>
div#header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 100px;
}
div#content {
position: fixed;
top: 100px;
left: 0;
right: 0;
bottom: 50px;
overflow: auto;
}
div#footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 50px;
}
Setting "left" and "right" differently you can make it take only a certain amount of the available space.
div#header {
position: fixed;
top: 0;
left: 20%;
right: 20%;
height: 100px;
}
div#content {
position: fixed;
top: 100px;
left: 20%;
right: 20%;
bottom: 50px;
overflow: auto;
}
div#footer {
position: fixed;
bottom: 0;
left: 20%;
right: 20%;
height: 50px;
}
With the above CSS the whole thing will be centered and leave 40% of the horizontally available space empty.