views:

38

answers:

1

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 img that's just the background color. Will that work? Other solutions?

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.

+3  A: 

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.

Scott
ahh, yes. So simple...thanks.
briligg
no, i don't want to apply it to all of them, so i just added an inline style to that particular div.
briligg
but for some reason the third image ignores the left margin of the parent div.text when i narrow the window... um, do you see why?
briligg
Not sure what you mean by "ignores the left margin." The `div.text` is NOT the parent of the final floated image based on my analysis of your page. It appears you close your `div` around the first two images, but missed the third.
Scott
woops - closed the parent div twice.
briligg
yeah, sorry - me dumb.
briligg