I have a CSS problem:
I have an absolute positioned div in a container. The container won't resize to the height of the content. Why?
You need to use JavaScript for this. With jQuery you can do
var parentHeight = $('#parent').height(), childHeight = $('#child').height(); if (parentHeight <= childHeight) { $('#parent').height(childHeight); }
2.1m questions
2.1m answers
60 comments
57.0k users