Keeping Parent Div From Collapsing When Floating Elements Inside it.

I had a div with the id of footer. I needed to float three other divs ( div1, div2, and div3) inside this footer div. When I floated div2 and hit refresh in the browser to see my results the parent div (footer) collapsed.

A quick search brought me to this following link that fixed the problem.

http://stackoverflow.com/questions/218760/how-do-you-keep-parents-of-floated-elements-from-collapsing/11597829#11597829

The part i needed was to set the parent div to “overflow:auto;”

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *