<li>
是否可以仅使用 CSS 填充标签的高度?
中心栏文本有时比两侧长,所以我需要在需要时增加它们的高度。
这是我的代码:http: //jsfiddle.net/U8WaH/16/
CSS:
.table {
margin: 0 auto;
}
.table ul li {
margin: 0;
padding: 5px 10px;
list-style: none;
border: 1px solid #C9C9C9;
vertical-align: top;
}
.table ul li.title {
font-weight: bold;
}
.table ul li.delete, .table ul li.delete input[type=checkbox] {
width: 20px;
}
.table ul li.result.delete {
padding: 5px 10px;
}
.table input[type=submit] {
float: left;
width: auto;
height: 29px;
margin-top: 10px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
-khtml-border-radius: 5px;
border-radius: 5px;
}
.table ul li.title, .table ul li.result {
display: inline-block;
}
.table ul li.last_replier {
width: 140px;
}
.table ul li.subject {
width: 315px;
}
.table ul li.status, .table ul li.category {
width: 120px;
}
.table a {
text-decoration: none;
margin: 0;
padding: 0;
}
.list-emails-table {
width: 900px;
}
.list-emails-table ul li.status {
width: 80px;
}
HTML:
<div class="table list-emails-table">
<ul><li class="title delete"> </li><li class="title category">Category</li><li class="title last_replier">Last Replier</li><li class="title subject">Subject</li><li class="title status">Status</li></ul>
<ul><li class="result delete"><input type="checkbox" name="action[]" id="checkbox[]" value=""></li><a href=""><li class="result category">Info</li><li class="result last_replier">Somebodys Name</li><li class="result subject">Short Text</li><li class="result status">Status Here</li></a></ul>
<ul><li class="result delete"><input type="checkbox" name="action[]" id="checkbox[]" value=""></li><a href=""><li class="result category">Info</li><li class="result last_replier">Somebodys Name</li><li class="result subject">Long Text - Long Text - Long Text - Long Text - Long Text - Long Text</li><li class="result status">Status Here</li></a></ul>
<ul><li class="result delete"><input type="checkbox" name="action[]" id="checkbox[]" value=""></li><a href=""><li class="result category">Info</li><li class="result last_replier">Somebodys Name</li><li class="result subject">Short Text</li><li class="result status">Status Here</li></a></ul>
</div>