How can I stop text wrapping around some floating elements?

I placed 3 images in divthe middle of a long piece of text. I want to place them so that the site retains the "liquid" design, adapting to the browser window of any width. But if the text begins to wrap to the left of them in wide windows, it looks bad. I would like them to float, but still I could clear the text around them so that they look like a block element. How can i do this?

I thought of sticking to a div100% width right after the image div, 1px high, and filling it with a 1px image, which would just be the background color. Will this work?

http://www.briligg.com/frailty.html The images in question are those that are at the beginning of the section β€œcause of addiction is stress”. Lines 134-146 refer to the internal stylesheet.

+4
source share
1 answer

Place the clear: lefttext following the images in your section.

This seems to be yours divwith the class text, although I don't know if you want to universally apply clearto all divs with this class.

+6
source

Source: https://habr.com/ru/post/1754869/


All Articles