- Code: Select all
<div class="box">
<div class="comment-left">
<img src="images/avatar.jpg" class="avatar-comment" />
</div>
<div class="comment-right">Comment one</div>
</div>
<div class="box">
<div class="comment-left">
<img src="images/avatar.jpg" class="avatar-comment" />
</div>
<div class="comment-right">Comment two</div>
</div>
And I have the following CSS:
- Code: Select all
#comments div.box {
padding: 5px;
margin: 5px 0;
background-color: #CCC;
}
.comment-left {
float: left;
width: 60px;
}
.comment-right {
float: right;
width: 550px;
}
But it doesn't work because the height of div.box equals only one line height.
1) Why doesn't the height of div.box stretch its height?
2) anyone has a better suggestion on how to make the comment list (needs to have room for avatar, message, author & date), or any tutorials?
Thanks

