How do I go about removing the bottom border from the very last row in my HTML table?
Here is the CSS:
#data {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
border: 1px solid red;
}
#data th {
text-decoration: underline;
border: 1px solid blue;
}
#data td {
border: 1px solid blue;
}
#data th, #data td {
padding: 5px;
text-align: left;
width: 150px;
}
#data thead {
background-color: #333333;
color: #fdfdfd;
}
#data thead tr {
display: block;
position: relative;
}
#data tbody {
display: block;
overflow: auto;
width: 100%;
height: 300px;
}
#data tbody tr:nth-child(even) {
background-color: #dddddd;
}
Here is a quick fiddle: http://jsfiddle.net/tZ9cA/
You could select the last table row child of tbody
element and then subject all its <td>
children as follows:
#data tbody > tr:last-child > td {
border-bottom: 0;
}
WORKING DEMO
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With