Here's what I am looking to achieve. I have HTML along those lines (in reality I use a separate CSS file of course):
<div id="container" style="position:absolute; left:20px; top:20px; height:300px; width:400px;"> <div id="header" style="width:100%;">header stuff here...</div> <div id="content">content stuff here...</div> </div>
I want header to be auto sized with respect to height and the rest of the parent div to be occupied by content. The content should fill exactly - no scrollbars or anything. Assume modern browsers, I don't care about IE6 or even IE7.
All the examples I've seen so far assume fixed header height. Can auto-sized header be achieved without JavaScript, or is it beyond capabilities of modern browsers?