Forum Moderators: not2easy
.entry {
background-color:#FFFFEE;
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>
If the entire <div> is suppose to have the background color of #D8CBD8, then it will not fill as you desire as the <div> ends before the image and text. Your html needs changed to:
<div class="entry">
<div class="title">Title of the post
<div class="date">date of post</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> <!-- This is the end tag for the .title div -->
</div>
As for the border, I assume you are speaking of the .entry <div>. Your css is wrong:
.entry {
background-color:#FFFFEE;
border:2px solid #750082;
margin-top:10px;
margin-bottom:10px;
padding:3px 3px 8px 3px;
height:auto;
clear:both;
}
You do realize that with your padding settings in the .entry, you will get a 3px white gap between your border and background color. Just an FYI.
Marshall
So your html should look like this:
<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 class="clearer"></div>
</div>
</div>
Now add this to your css:
.clearer
{
height: 1px; /*0px might work too*/
clear: both;
}
That should cause it to work!
If the entire <div> is suppose to have the background color of #D8CBD8, then it will not fill as you desire as the <div> ends before the image and text. Your html needs changed to:
I popped his code into a html file and I saw how he wanted to display it - and it works fine. No need for corrections on this point. I didn't test the border issue though.