June 30, 2009

CSS Text Wrap in a Grid

I’ve been working with a grid system for my latest project, and it’s been great.  I don’t usually start with someone else’s code though, and so I missed something.  The text on one page would not wrap around right-floated images.  I finally removed all the styles on both the p tag and the div for the image, and still no text wrap, so …

The grid CSS had this:

p {
...
overflow:hidden;
}

Of course, that’s great if you’re trying to contain both the text and the floated image in a parent container, but not so great if you’re trying to wrap text.  Once “overflow: hidden” was removed for that p element, the text wrap and the image float behaved normally again.

1
Comments (View)
  1. techietoo posted this
blog comments powered by Disqus