I have the same question with a slight change
Make div (height) occupy parent remaining height
Here is a fiddle. http://jsfiddle.net/zf0fvgk0/
<div id="container">
<div id="up">Text<br />Text<br />Text<br /></div>
<div id="middle">Text<br />Text<br />Text<br /></div>
<div id="down">Text<br />Text<br />Text<br /></div>
</div>
How do I make the middle one occupy all the empty height in the div left by up and down?
note: my container, up and down's height can change, so I dont want to hardcode a pixel value