I\'m trying to make a website where header and footer have fixed position while content scrolls in the middle.
If you want the content height to match the browser window (less the header and footer), use javascript to set it (and adjust on window resize events)
The easiest fix for this is to add padding equivalent to the height of your static header and footer:
#content {
width: 80%;
margin: 0 auto;
padding: 60px 0;
}
JSfiddle
http://jsfiddle.net/yASFU/
<header>header</header>
<section>
<div class="push">push</div>
</section>
<footer>footer</footer>
html, body {height:100%; margin:0; overflow:hidden;}
header, footer {display:block; background-color:black; height:10%;}
section {height:80%; background-color:lightblue; display:block; overflow:auto;}
section .push {height:4000px;}