You cannot get the actual div for the extension to fill in the gap without Javascript, but you can easily make it look like this. Moving the background color of the rule: # 0F9; from #middle to #container. This will give you the required behavior (it will fill the gap when there will be minimal content, and when there will be a lot of content, it will expand down by clicking the footer with it).
If you need a Javascript solution, the following code will work. Just specify this in the HTML header section:
<script type="text/javascript">
window.onload = function() {
var mid = document.getElementById('middle');
var foot = document.getElementById('footer');
mid.style.height = ((foot.offsetTop+foot.clientHeight)-(mid.offsetTop+mid.clientHeight))+'px';
};
</script>