Hi everyone, I'm new in the forum. I've found the advice here helpful in the past and I'm hoping someone can help me now. I want to make this page look neater: http://www.naturalfrugality.com/money/5-disposables-youre-better-off-without/article.php. Does anyone have a suggestion to keep the images and captions from encroaching on the other paragraphs the way they do now? I can only imagine resizing the images but I think that could lead to problems, making some pictures look worse than others. Here's my basic code.

<span class="classname" style="float:right"><img src="pic.jpg" />
<br>Picture description<br>Click to buy</span>
<b>Section title</b><br>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque venenatis lorem id tortor commodo facilisis. Aenean commodo, tortor a volutpat iaculis, ipsum nisl lobortis tortor, sed ultrices nibh lectus et purus. Nullam vel felis tellus. Sed laoreet aliquet ligula, vel accumsan massa aliquet non. Cras ac quam quis mi consequat volutpat. Maecenas hendrerit dui sit amet eros condimentum non tincidunt tortor ultricies.
<br /><br />

Recommended Answers

All 2 Replies

You could put a div around the paragraph and the image, but then the paragraphs would be separated with some whitespace.

Thanks, pritaeas. This works:

<div style="border-style:solid; overflow:hidden">
      <span class="classname" style="float:right"><img src="pic.jpg" />
      <br>Picture description<br>Click to buy</span>
      <b>Section title</b><br>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque venenatis lorem id tortor commodo facilisis. Aenean commodo, tortor a volutpat iaculis, ipsum nisl lobortis tortor, sed ultrices nibh lectus et purus. Nullam vel felis tellus. Sed laoreet aliquet ligula, vel accumsan massa aliquet non. Cras ac quam quis mi consequat volutpat. Maecenas hendrerit dui sit amet eros condimentum non tincidunt tortor ultricies.
      <br /><br />
</div>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.