Take a look at this example:
http://jsbin.com/ixiju4/2/edit
I have a shell whose height is defined and two containers inside: top and bottom . The height of the top container is not fixed (in the example, it is set to 100 pixels, but this is just for demonstration). I want the dynamic set of the bottom container to fill the rest of the shell.
In this demo, I did this using JS:
$(function() {
var top = $('#top');
var bottom = $('#bottom');
bottom.height(bottom.parent().height()-top.outerHeight());
});
Do you think there is a way to do this in pure HTML / CSS? Regardless, I can even use tables . I have been thinking about a solution for a long time and have not found a cross browser compatible with it. Thanks for any help.
UPDATE 1:
I made one mistake defining these issues. top does not have a fixed height - it is determined by the content.
http://jsbin.com/ixiju4/6
UPDATE 2:
OK. This is what I really want:
http://jsbin.com/ixiju4/8
source
share