Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can stop text wrapping around some floated divs?

I floated 3 images in divs in the middle of a long section of text. I want to float them so the site keeps it's 'liquid' design, adapting to any width browser window. But if text starts wrapping to the left of them on wide Windows, it looks bad. I'd like them to float, but still be able to clear text around them so they look like a block element. How can I do that?

I thought maybe of sticking in a 100% width div right after the image divs, that's 1px high, and filled with a 1px image that's just the background color. Will that work?

http://www.briligg.com/frailty.html The images in question are the ones at the beginning of the 'the cause of addiction is stress' section. Line 134 to 146, references the internal style sheet.

like image 608
kim holder wants Monica back Avatar asked Jul 15 '10 18:07

kim holder wants Monica back


1 Answers

Put a clear: left on your section of text following the images.

That appears to be your div with class text though I don't know if you would want to universally apply the clear to all the divs with that class.

like image 52
ScottS Avatar answered Oct 10 '22 05:10

ScottS