Click here to Skip to main content
12,511,553 members (51,903 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: HTML Beginner
(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
peterchen153.4K
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Try this:

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

Solution 2

Check out the list of available CSS Properties at http://www.w3schools.com/cssref/[^].
Also a nice place to start learning HTML.
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160929.1 | Last Updated 20 Jul 2011
Copyright © CodeProject, 1999-2016
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