I want to give my first and last <td>
a border-radius
so that my table looks like a rounded table.
First I applied background to my <td>
and then added border-radius
, which works fine I think(background rounded from the corner).
After that when I applied border to my <td>
, I saw a weird thing(See below snippet).
So my question is why border is not rounded as background?
Stack Snippet
table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
text-align: center;
font: 13px Verdana;
}
table td {
border: 1px solid #000000;
padding: 20px;
background: red;
color: #ffffff;
}
table tbody tr:first-child td:first-child {
border-radius: 20px 0 0 0;
}
table tbody tr:first-child td:last-child {
border-radius: 0 20px 0 0;
}
<table>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
</tr>
</table>