I need to fill the remaining vertical space of #wrapper
under #first
with #second
div.
I need an only CSS sol
you need javascript and some client side calculations: http://jsfiddle.net/omegaiori/NERE8/2/
you will need jquery to effectively achieve what you want. this function is very simple but very effective:
(function () {
var heights = $("#wrapper").outerHeight(true);
var outerHeights = $("#first").outerHeight(true);
jQuery('#second').css('height', (heights - outerHeights) + "px");
})();
first it detects the wrapper height, as it is set to 100% it's different everytime (it depends on what screen you are landing).
in the second step it gives the #second
div the appropriate height subtracting from the wrapper height the #first
div height. the result is the available height left in the wrapper div