CSS float overlap with div border solution
Posted on May 5, 2009 by
Paul WhiteIf you have spend more than 5 minutes working with
CSS you have most
likely come across the issue with Internet explorer not liking to play
nice with your floated images and divs. The result is your images will
float outside the border of its containing div. After 2 trips to the
espresso machine, and 10 hours later, I found the solution. And no it
has nothing to do with the clear:both;
The solution is to use overflow:auto; on the container div. This will force it to stretch and contain your floated images and divs. Hope this saves other people some time.
10950 Visitors
10950 Views
oh man, this is exactly the info I needed. Was about to go crazy figuring this out!