kim holder
kim holder

Reputation: 1854

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.

Upvotes: 6

Views: 6392

Answers (1)

ScottS
ScottS

Reputation: 72261

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.

Upvotes: 7

Related Questions