|  | Posted by Jonathan N. Little on 06/19/40 11:21 
Ben Bullock wrote:> Hi,
 >
 > I tried using something like
 >
 > <h3>Title 1</h3>
 >
 > <p>
 > <img align=left> ...</img>
 > a little text.
 > </p>
 >
 > <h3> Title 2</h3>
 >
 > for some images, but the problem with this was that because the text in
 > the paragraph was short, successive titles and images became staggered
 > towards the left. So "Title 2" appears on the left of the image. There
 > is a picture on page 134 of the O'Reilly book "HTML and XHTML" of what
 > happens. I want to make sure that Title 2 appears under the image, no
 > matter how short the text in the paragraph is.
 >
 > How can I ensure this?
 >
 > Thank you for any help.
 >
 > Ben.
 >
 
 1: The answer could have been found by searching this NG with 'float'
 
 2: <img align=left> ...*</img>*, image element does not have an ending tag.
 
 3: <img *align=left*> ...</img> attribute *align* is deprecated in 4.01
 you should style the element with float
 
 4: On way would be to clear the floats with your heading...
 
 
 CSS:
 H3 { clear: both; }
 ..onLeft { float: left; }
 
 
 HTML:
 
 <h3>Short Title 1 </h3>
 <p><img src="somepix1.jpg" alt="somepix1">
 text about somepix1 ...
 </p>
 
 <h3>Short Title 2 </h3>
 <p><img src="somepix2.jpg" alt="somepix2">
 text about somepix2 ...
 </p>
 ..
 ..
 ..
 --
 Take care,
 
 Jonathan
 -------------------
 LITTLE WORKS STUDIO
 http://www.LittleWorksStudio.com
  Navigation: [Reply to this message] |