I am attempting to design a table with rounded top borders on both sides, while the remaining borders of the table remain squared.
Despite applying CSS, the borders continue to appear squared, although the background-color
is indeed rounded, resulting in an odd appearance:
table {border-collapse:collapse}
th {border-top:1px solid red; width:70px}
th, td {text-align:left; background-color:#cccccc}
th.header1 {border-top:1px solid red; border-left:1px solid red; border-top-left-radius:20px}
th.header2 {border-top:1px solid red; border-right:1px solid red; border-top-right-radius:20px}
The outcome looks like this:
Is there a way to achieve a 'rounded' effect on the borders in the top left/right header cells so that the red border aligns with the background color?
For a demonstration, please refer to the JSFiddle.