Marc Blase

overflow:hidden for neat text blocks

If you have a floated image or block that text will run into but you don’t want the text to run under the image or block. Simply apply overflow:hidden; to the css for the floated image or block.

UPDATE: This only applies to blocks that are adjacent to the floated element. If you have additional blocks that should also align with those adjacent to the float, nest them all in a div.

Published on December 13, 2010