UPDATE: I think there was too many information. Here’s my question: how to make the height of #middle 100% of the remaining space in the following exampl:
<body>
<div id="big">
<div id="header"></div>
<div id="middle"></div>
<div id="btm"></div>
</div>
</body>
height of #big, body, html is all 100%.
Height of header and bottom are 120px;
Update: Changed my example to match your updated question
Here’s a working example of your layout. Tested in IE8, IE7, Firefox, and Chrome.
The key here is NOT to set this height of
middleto 100%. Instead, you position it absolutely, withtopandbottomequal to the height of yourheaderandbtmelements (in your case, 120px).If you set the height of the
middleelement to 100%, it will be the same height as thebigelement, which is 100% of the body tag, and hence yourmiddleelement will be too large, causing horizontal scroll bars.