Click here to Skip to main content
13,087,566 members (85,342 online)
Rate this:
Please Sign up or sign in to vote.
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 19-Jul-11 23:54pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try this:

<p style="clear:both;">
peterchen 20-Jul-11 7:02am
Thanks! That does it.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Check out the list of available CSS Properties at[^].
Also a nice place to start learning HTML.
peterchen 20-Jul-11 7:03am
Just as an addition, for germans, the canonical place to go is . 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 20 Jul 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100