for example :
I just have two divs in a body, body’s height is 100%:
<body>
<div id="menuBar" style="height:30px"></div>
<div id="content"></div>
</body>
I want #content can auto adopt the height left in browser window
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First off: Why do you want to do this? Normally something like this is not necessary, and you just need to to look as if
contentfills the rest of the window, and there are better solutions depending on your actual objective.Especially the fixed height in pixels of the “menu bar” will be problematic – keep in mind it’s not possible to force a specific font size on your user!
If you really know that this what you want, then you can position
contentabsolutely:(However this isn’t supported by IE6.)