so i have this:
styled like this:
#parent {
In CSS the control always flows from top down, so the child's height can be controlled by the parent but not the other way round. You could use the following jquery to achieve what you're after though:
var resizeParent = function() {
var child_height = $('#child').height();
$('#parent').height(child_height);
};
$(window).resize(function() {
resizeParent();
});
$document.ready(function() {
resizeParent();
});