View Single Post
  #1 (permalink)  
Old Aug 30th, 2006, 10:38
Salbert Salbert is offline
Junior Member
Join Date: Aug 2006
Location: Lancashire, UK
Age: 28
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Floating an image inside colour div bkground

Hi,

I wanted to make elements on a site more prominent by adding a background colour and border (creating a box) as a sort of feature. When I add an image into this 'feature' box and float it so it appears to the left if the image is longer than the text content in the box it overlaps the bottom of the box. I've tried to illustrate this below....

STYLE:
#feature {
background-color:#EEEEEE;
border:1px solid #D7D7D7;
padding:10px;
}
.floatL {
float:left;
padding:0px 10px 0px 0px;
}

CODE:
<div id="feature">
img src="#.jpg" alt="#" width="80" height="61" border="0" class="floatL">
<p>Text content....</p>
</div>

Painfully simple I know , I'd be glad for any advice, Thanks.
Reply With Quote