I wish to have a page that has a fixed height (without scroll bars). Then underneath the header a fluid height div that does have a scroll bar(not the entire page). Also, the width is to be fluid on the entire page.
This is illustrated below:
What should i do in HTML so that it works in all browsers including IE6 ?
EDIT: CODE CHANGED, works in IE6,Firefix,Chrome, However, IE6 shows 4 scrollbars !!!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
HTML,BODY
{
height:100%;
}
.fullContainer
{
width:80%;
height:40%;
overflow:auto;
position:relative;
}
/*-- Can only modify these --*/
.header
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height:40px;
background-color:#eeeeee;
}
.content
{
position: absolute;
top: 40px;
left: 0;
right: 0;
bottom: 0;
overflow:auto;
}
.contentContainer
{
height:100%;
}
* html .fullContainer{ /*IE6 hack*/
padding: 40px 0 0 0;
}
* html .content{ /*IE6 hack*/
height: 100%;
width: 100%;
}
/*-- Can only modify these --*/
</style>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div>before content...</div>
<div class="fullContainer">
<div class="header">Header</div>
<!-- <div class="contentContainer"> -->
<div class="content">
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
<div style="width:1000px;background-color:#ccffcc;">long text</div>
</div>
<!-- </div> -->
</div>
<div>after content...</div>
</body>
</html>