Forum Moderators: not2easy
<img src="comment-icon.gif"><div style="font:10pt Arial;padding:5px;background-color:#ccc;"><span style="float:right">No. 1</span><span style="font-weight:bold;padding-right:10px">John Doe</span><span style="color:#808080">11/14/2010 3:23:44</span></div> <table style="font:10pt Arial">
<tr>
<td style="vertical-align:middle"><img src="comment-icon.gif"></td>
<td style="width:100%">
<div style="padding:5px;background-color:#ccc;border-top:1px solid #DEDEDE"><span style="float:right">No. 1</span><span style="font-weight:bold;padding-right:10px">John Doe</span><span style="color:#808080">11/14/2010 3:23:44</span></div>
</td>
</tr>
</table> <div class="comment">
<span class="number">No. 1</span>
<span class="name">John Doe</span>
<span class="date">11/14/2010 3:23:44</span>
</div>
/* line-height of 2 used instead of top/bottom padding the div either/or will do */.comment {
font: 13px/2 arial, verdana, sans-serif;/* the 50% centers the background vertically then adjust the left position to suit */background: #ccc url(youricon.gif) no-repeat 5px 50%;/* adjust left padding to leave enough room to show the icon background and a "whitespace" border around it */border-top: 1px solid #dedede;
padding: 0 5px 0 40px;margin: 3px;
}
.comment .number {float: right;}
.comment .name {font-weight: bold; padding-right: 5px;}
.comment .date {color: #808080;}
and a "whitespace" border around it
I wonder if you could tell me how to do it.
Suzy's use of background-images to avoid server hits is sound reasoning (of course), but the background-color is displaying "around/behind" the image. I think that's the issue you want to solve.