i know every web-developer hates this topic, but anyway… i found no good solution for this.
i have 3 DIVs, two static (grey ones) and one dynamic (red one).
The image describes the whole window. Such as at a chat application.

And, yep, the question is: how do i get the red one dynamic when the window get resized (or on other layout changes).
Is there a soltuon without javascript, just CSS(3)?
Edit: Condition: the DIV on bottom should stay on bottom of the window, sorry.
Additional Information
I already done it in JS (jQuery), but i think this is no good practice at all. (The resize method for the middle DIV have to implement in every “layout changing event”).
Example here:
var div1 = $('#div1').outerHeight(true);
var div2 = $('#div2').outerHeight(true);
var div3Padding = $('#div3').outerHeight(true) - $('#div3').innerHeight();
$('#div3').css({ height: window.innerHeight - (div1 + div2) - div3Padding });
With absolute positioning, you can do: http://jsfiddle.net/rQVmK/