I want to create 3 div such that the entire page is of the size of the window( i.e the page should not scroll) and each div should have height as of some percent of the entire height. e.g
|--------------------------------------|
| Body height=window's height |
| |----------------------------------| |
| | Header height:10% | |
| |----------------------------------| |
| | | |
| | Content height:85% | |
| | | |
| | | |
| |----------------------------------| |
| | Footer height:5 % | |
| |----------------------------------| |
|--------------------------------------|
Here is the code which I used without any success
<body style="width: 100%; height:100%">
<div style="width: 100%; height:100%;">
<div id="headerDiv" style="width: 100%; height:10%; background-color: #ff0000">
<!-- some content -->
</div>
<div style="width: 100%; height:85%;" >
<!-- some content -->
</div>
<div style="width: 100%; height:5%" >
<!-- some content -->
</div>
</div>
</body>