I have designed a table using Grid CSS. However, I am facing an issue where I cannot apply border-radius to it due to the overflow: auto property that is necessary.
Current Table Design: https://i.sstatic.net/dNehv.png
Desired Table Design (with consistent rounded corners even when scrolling): https://i.sstatic.net/kGihC.png
thead, table, tbody, tr, th, td {
display: block
}
.table__row {
grid-template-columns: 74px 170px 170px 170px 170px 170px 170px 170px 170px 170px 170px;
display: grid;
grid-gap: 1px;
}
.table {
display: grid;
width: 1000px;
margin: 0 auto;
overflow: auto;
}
.table__head {
background-color: #EDEFF4;
padding: 20px 0;
height: 64px;
}
.table__body {
display: grid;
border-radius: 16px;
}
.table__cell {
padding: 12px 16px;
}
.table__body .table__cell {
background-color: #747C8C;
border-bottom: 1px solid #E2E4F6;
}
<table class="table">
<thead class="table__head">
<tr class="table__row">
<th class="table__cell table__cell_title">
Title
</th>
<th class="table__cell table__cell_title">
Title
</th>
// additional header cells
</tr>
</thead>
<tbody class="table__body">
// body rows and cells
</tbody>
</table>
I have attempted setting overflow separately for the body and header sections, but this resulted in unsynchronized scrolling. Is there an alternative method to achieve rounded borders on an overflowing table?