这是我的评论列表的 html 代码:
<div id='commentbox'>
<ul id='holder'>
<li class='comment'><span class='commenter'>commenter1: </span>
<span class='commsg'>blabla1</span>
</li>
<li class='comment'><span class='commenter'>commenter2: </span>
<span class='commsg'>blabla2</span>
</li>
<li class='comment'><span class='commenter'>commenter3: </span>
<span class='commsg'>blablaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3</span>
</li>
<li class='comment'><span class='commenter'>commenter4: </span>
<span class='commsg'>blabla4</span>
</li>
</ul>
</div>
这是CSS:
.comment{
border-style:solid;
width:500px;
}
.commsg{
font-size: 12px;
color: #333333;
font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}
.commenter{
font-family: 'Gill Sans', Verdana;
font-size: 11px;
line-height: 14px;
text-transform: capitalize;
letter-spacing: 1px;
font-weight: bold;
}
我的问题是,如果我插入像第三条这样的大评论,它就会超出<li>
边界。我怎样才能有一定的评论宽度?
问题解决了。谢谢你们俩。