Click here to Skip to main content
15,881,681 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
(Total "layout with tables was so much easier" HTML n00b question)


I have a paragraph with a floating image to the right:

<img src="foo.png" style="float: right" /><p>Blablabla</p>

<p> next paragraph</p>>


If the first paragraph is short, the image also floats besides the next paragraph.

I want Next paragraph to start after the image. How do I do that?

(just wrapping them in a div doesn't make any difference..)
Posted

Try this:

<p style="clear:both;">
 
Share this answer
 
Comments
peterchen 20-Jul-11 7:02am    
Thanks! That does it.
Check out the list of available CSS Properties at http://www.w3schools.com/cssref/[^].
Also a nice place to start learning HTML.
 
Share this answer
 
Comments
peterchen 20-Jul-11 7:03am    
Just as an addition, for germans, the canonical place to go is http://de.selfhtml.org/ . I'm using that when I know what I'm looking for.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900