I am facing an issue with this code snippet:
tr:first-child th:last-child {
-webkit-border-top-left-radius: 15px;
-moz-border-radius-topleft: 15px;
border-top-left-radius: 15px;
}
tr:first-child th:first-child {
-webkit-border-top-right-radius: 15px;
-moz-border-radius-topright: 15px;
border-top-right-radius: 15px;
}
tr:last-child th:last-child {
-webkit-border-bottom-left-radius: 15px;
-moz-border-radius-bottomleft: 15px;
border-bottom-left-radius: 15px;
}
tr:last-child th:first-child {
-webkit-border-bottom-right-radius: 15px;
-moz-border-radius-bottomright: 15px;
border-bottom-right-radius: 15px;
}
A similar styling has been applied to the <td> tags as well.
The intention behind this code is to create rounded corners for a table.
However, I have encountered a problem.
In one of the tables on my website, the last row contains hidden <td> elements. When a user clicks on the <th> line, these hidden <td> elements are revealed.
The CSS assumes that there is a <td> element in the last position of each <tr>, resulting in rounded corners. But since these specific <td> elements are hidden, it affects the appearance of the visible <th> elements in the same <tr>. This inconsistency in styling looks unappealing.
Any suggestions on how to resolve this issue?