使用position:absolute;来定位:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title>demo</title>
<style type="text/css">
body{margin:0px;padding:0px;overflow:hidden;padding-top:22px;padding-bottom:22px;}
div{margin:0px;padding:0px;}
#header{background-color:blue;color:white;position:absolute;top:0px;left:0px;height:16px;width:100%;}
#content{background-color:yellow;width:100%;height:100%;overflow:auto}
#footer{background-color:green;color:white;width:100%;height:16px;position:absolute;bottom:0px;left:0px;}
</style>
<script language="javascript">
</script>
</head>
<body>
<div id="header">header</div>
<div id="content">
<script language="javascript">
for(i=0;i<1000;i++){
document.write(i+"<br />");
}
</script>
</div>
<div id="footer">footer</div>
</body>
</html>