Hello.
I have this code:
<div id="body" style="height: 295px; width: 427px; position: absolute; top: 261px; left: 284px;">
<div id="header">
Some dynamic text<br/>
Some dynamic text<br/>
</div>
<div id="Content">
<textarea id="text" style="width: 100%"> </textarea>
<input type="file" style="width: 100%">
</div>
<div>
</div>
I want to set content div to fill remaining space of its parent. The text is generated server side and it causes the height of the header to change.
The output should look like this: file input should be at the bottom of the content with text input filling remaining of the Content. Content itself fills remaining of the Body, which height is influenced by dynamic text.
I am interested only in CSS solution, as this is easy to do with JS. Also, only width and height of the Body div can be hardcoded.
EDIT: Some clarifications:
- #Body is fixed size
- #Header is dynamic size, can be of any height. If its height > #Body.height, the rest will be cropped and #Content height will be 0. Alternativelly, if possible, #Header could be limited to max half of the #Body with the rest cropped or scrollable.
- #Content doesn't need any special clarification. It contains of fixed file input and dynamicly height textarea
Thx.