Floated Image Not Included in Div Height

I ran into an interesting problem today.

I have a div that contains an image that is floated left.  I am using the WP Equal Columns WordPress plugin to dynamically set the height of the div.  The problem is that the image float was messing with the height of its container div.

The solution was quite simple.

I added the “overflow:hidden” property to the container div, and now it is the correct height.

Pretty nifty, eh?

Many thanks to the Stack Overflow community for helping me figure this out.

Posted in ,

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress consultant, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and then to twitter.com/tobycryns and twitter.com/themightymo

Follow Toby's contributions on Github and WP.org.