re: Where would that variable height come from?

I want the Div to be the same height as the items in the Div.
Specifically, if I generate HTML. I want the page to show...

The Header
All the HTML I generated
The footer. (Available below the fold)

Rather than:

The header.
Half of the html I generated, with the rest available via a secondary scrollbar.
The footer (Available below the fold)

Does this make sense? I feel I'm not explaining myself well here.
I can draw pictures, if that helps.