我有一个HTML表,我想最后一排排除与.table-bottom类行,并删除其border-bottom:如何在CSS中选择具有特定类名的元素的“最后一个孩子”?
ID | Post title | Date | Owner | Actions |
---|---|---|---|---|
1 | Test | 16.7.2013 | Admin | Delete |
2 | Test 2 | 3.8.2013 | Admin | Delete |
.table tr th {
color:#929191;
font-weight:bold;
font-size:14px;
text-align:left;
padding-left:19px;
border-right:1px solid #d7d7d7;
border-bottom:1px solid #d7d7d7;
}
.table tr th:last-child {
border-right:none;
}
.table tr td {
color:#929191;
font-weight:bold;
font-size:12px;
padding:19px;
border-right:1px solid #d7d7d7;
border-bottom:1px solid #d7d7d7;
}
.table tr td:last-child {
border-right:none;
}
.table .table-middle:last-of-type td {
border-bottom:none;
background:red;
}
.table tr.table-middle td:first-child {
text-align:center;
}
.table tr th:first-child {
text-align:center;
padding-left:0px;
}
.table tr.table-bottom td {
border-right:none;
border-bottom:none;
}
但.table .table-middle:last-of-type td选择不工作。
任何想法?
2013-08-18
Sonic656
+0
你也可以在这里找到类似的问题:http://stackoverflow.com/a/7298062/1725764 –