I want my container div to get the height of max of its children\'s height. without knowing what height the child divs are going to have. I was trying out on JS
You are floating the children which means they "float" in front of the container. In order to take the correct height, you must "clear" the float
The div style="clear: both" clears the floating an gives the correct height to the container. see http://css.maxdesign.com.au/floatutorial/clear.htm for more info on floats.
eg.
World