I would like to dynamically resize a parent div to fit it’s children, but how?

Question by Teonnyn: I would like to dynamically resize a parent div to fit it’s children, but how?
CSS options have all but dried up for the methods I’ve been using, so Javascript seems to be the best bet. However, the child divs change per page. What is the Javascript-based method to force a parent div to change height to fit it’s child divs dynamically based on child div height and position? I’m willing to use mootools or jQuery if needed.

Best answer:

Answer by Mike S
Try padding the bottom of the parent div in css. Beware browser comliance though.

What do you think? Answer below!

About Admin