The problem is that headerDiv has variable height, so dataDiv can't have fixed height defined, but should take all available height that remains in mainDiv
Expand|Select|Wrap|Line Numbers
- <style>
- #mainDiv{
- position:absolute;
- left:100px;
- top:100px;
- width:500px;
- height:500px;
- }
- #headerDiv{
- width:100%;
- }
- #dataDiv{
- width:100%;
- overflow:auto;
- height:???
- }
- #footerDiv{
- width:100%;
- height:20px;
- }
- </style>
- <div id="mainDiv">
- <div id="headerDiv">
- Header with height based on content
- </div>
- <div id="dataDiv">
- Variable data, scrollable if container height is exceeded
- </div>
- <div id="footerDiv">
- Fixed size footer
- </div>
- </div>
thanx
Simon