Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>
like image 976
HelpNeeder Avatar asked Feb 10 '12 05:02

HelpNeeder


1 Answers

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

<p style="clear: both;">
  • DEMO
  • CSS clearMDN
like image 113
calebds Avatar answered Sep 26 '22 02:09

calebds