I tried asking this earlier but judging by the down-votes and snarky comments, I didn't make my question clear enough. So I'll have another shot. With pictures and stuff.
I have a simple page with 4 main elements: a header, footer and middle, all contained in a wrapper. The wrapper should be 100% of screen height at a minimum. The footer is sticky- permanently stuck at the bottom of the wrapper. The header is always in the same position.
The tricky part is the middle; I want it to always span the full space between header and footer, but, if required, to also push the wrapper to expand beyond its minimum height.
Here is an illustration of my question:
And jsfiddle.
The only method I can think of is to use the css calc method, but it is far too unreliable. Can anyone suggest a better way to achieve this please.
EDIT:
The green shown in the illustration is the middle div, not the wrapper showing through. ie. I specifically need the middle div to always span the full gap between header and footer.