keep a floated image inside parent border

liunx

Guest
I have a page which has a floated image. As you might see the image falls out of the parent <div> border. Is it possible to keep it within?

<!-- m --><a class="postlink" href="http://www.total-image-nation.co.uk/portfolios.phpI">http://www.total-image-nation.co.uk/portfolios.phpI</a><!-- m --> usually use a 1-pixel-high div to clear the containing div:

<!-- in the style section -->
.clear {
font-size: 1px;
line-height: 1px;
margin: 0;
padding: 0;
height: 1px;
clear: both;
}
<!-- in the HTML markup -->
<div>
<img blah...blah...blah>
<p>Blah...blah...blah</p>
<div class=clear></div>
</div>Fantastic - I knew I'd read it recently in the Eric Meyer book but couldn't find it.....
 
Back
Top