Search code examples
htmlcssalignment

Move text below picture if picture is aligned to the side


I have a image and text. The image is aligned to the left because I want to the text to be next to the image. Both, image and text, are in a <p></p>.

Now. I want to insert additional text which would show under previous text and the picture.

How to do this?

Some code:

<p><img src="image.gif" align="left" width="300" height="200"> Good paragraph of text</p>
<p>Text that I want to appear below the text and the image above</p>

Solution

  • The simplest solution is to add a CSS style attribute to the second p like:

    <p style="clear: both;">