jebadoa
08-17-2008, 08:33 AM
I have a div that contains a header, an image, and some text. The image is floated left, and the text is to the right of it. The image is taller than the text block. The trouble is, the background color stops where the text stops, not where the image stops. Incidentally, the border does not show in IE7 either. Noob needs help!
.entry {
background-color:#999;
outline:2px solid #750082;
margin-top:10px;
margin-bottom:10px;
padding:3px 3px 8px 3px;
height:auto;
clear:both;
}
.entry img{
float:left;
position:relative;
z-index:1;
}
.title {
font-size:x-large;
background-image:url(../images/Bkgd2.gif);
background-color:#D8CBD8;
padding:inherit;
color:#4A004C;
}
.post {
height:100%;
padding-top:5px;
font-size:larger;
color:#4A004C;
}
.date {
font-size:small;
font-style:italic;
text-align:right;
}
<div class="entry">
<div class="title">Title of the post
<div class="date">date of post</div>
</div>
<div class="post"><img class="alignnone"
title="title of pic"
src="http://etc" alt="alt val" width="200" height="260" />"
Text content
</div>
</div>
.entry {
background-color:#999;
outline:2px solid #750082;
margin-top:10px;
margin-bottom:10px;
padding:3px 3px 8px 3px;
height:auto;
clear:both;
}
.entry img{
float:left;
position:relative;
z-index:1;
}
.title {
font-size:x-large;
background-image:url(../images/Bkgd2.gif);
background-color:#D8CBD8;
padding:inherit;
color:#4A004C;
}
.post {
height:100%;
padding-top:5px;
font-size:larger;
color:#4A004C;
}
.date {
font-size:small;
font-style:italic;
text-align:right;
}
<div class="entry">
<div class="title">Title of the post
<div class="date">date of post</div>
</div>
<div class="post"><img class="alignnone"
title="title of pic"
src="http://etc" alt="alt val" width="200" height="260" />"
Text content
</div>
</div>