Jan
28
I know I've read this article about 10 times over, and yet I always seem to keep forgetting about it. Everyone always suggests, "in order to keep a floated image from floating over its containing box, add a 1px DIV, or BR tag that uses a style of clear:both". This is what I always remember, simply because it's the most prevalent solution.
However, thanks to my CSS love in Paul O'Brien at SitePoint, there's a much, much simpler solution. Apply overflow:auto; to the containing element. That's all there is to it. I love that man!
Source: http://www.sitepoint.com/blogs/2005/02/26/simple-clearing-of-floats/
However, thanks to my CSS love in Paul O'Brien at SitePoint, there's a much, much simpler solution. Apply overflow:auto; to the containing element. That's all there is to it. I love that man!
Source: http://www.sitepoint.com/blogs/2005/02/26/simple-clearing-of-floats/


0 Trackbacks