I hope the title was clear enough to get the general idea. The problem itself is a little bit trickier. To help with the understanding see my illustration below.
Since I don't have enough reputation points to include the illustration directly, here is a link to it on flickr.com: http://www.flickr.com/photos/cumbrowski/12009919663/
Or link to image here at Stackoverflow.com: https://i.stack.imgur.com/1Kswi.png
Phrasing it out in full-text.
The outer-most container should always be vertically and horizontally centered in the available browser window. Both Width and Height are dynamic, but the height cannot exceed 90% of the available window height.
The inside of the container has 3 containers.
The top-most container has a fixed height but the width should span the entire outer container width.
The bottom-most container should also span the entire width of the outer container, but it's height can vary, based on it's content. Preferably, If the container is empty, the height should shrink to 0 (if possible).
The center-most container controls the width and height of the outer-container, except, if the total height of the outer container would exceed the maximum of 90% of the available window height. In that case the center-container should show scroll bars.
NOTE: If there is no pure CSS based solution possible and the help of JavaScript needed, okay, sad, but if necessary, what can I do?! jQuery would be okay in that case as well.