Forum Moderators: not2easy
In moz/ff the div only size to the height of the <p>, so if thats shorter than the image, the image overlaps the bottom of the div, killing the layout.
div has a class of banner:
.banner {
width:100%;
border-top:1px solid #639154;
margin-bottom:8px;
font-size:85%;
line-height:95%;
}
.banner img {
margin:6px;
float:left;
clear:none;
width:120px;
}
.banner p {
margin-right:3px;
margin-top:2px;
}
any suggestions?
thanks
Adding a clearing element isn't necessary.
Thanks, CEM, for reminding me of that! I had been meaning to test and employ that method on a current project - and of course it works (and my markup is ever-so-slightly smaller and simpler).
So just for the record, here's a very stripped-down working answer to the OP's question:
<div style="float:left;background:#F90;width:720px;">
<img src="http://www.example.com/img.gif" alt="" width="60" height="80" style="float:left;background:#FC0;">
<p style="background:#900;">Aliquam ac ante. Fusce justo sapien, congue sit amet, pellentesque eu, auctor ut, orci. Maecenas turpis. Aenean risus dolor, lobortis non, fringilla at, hendrerit at, ante. Quisque quis lacus vel tortor euismod convallis. Ut tincidunt convallis lectus. Nulla condimentum pellentesque magna.</p>
</div>
-B
<edit>Added width back to div</edit>
[edited by: bedlam at 3:04 am (utc) on Oct. 6, 2004]