HTML and CSS Reference
In-Depth Information
within the last row of the table by using the last-child pseudo-class selector to select
the last <tr> element within the table and target the <td> elements within that row. Ad-
ditionally, if a table is using the structural elements, we'll want to make sure to prequalify
the last row of the table as being within the <tfoot> element (see Figure 11.8 ).
Click here to view code image
1. table {
2. border-collapse: collapse;
3. }
4. th,
5. td {
6. border-bottom: 1px solid #c6c7cc;
7. padding: 10px 15px;
8. }
9. tfoot tr:last-child td {
10. border-bottom: 0;
11. }
Figure 11.8 A table with borders between each row
Search WWH ::

Custom Search