JSFiddle - React, Tailwind, and code Playground
HTML
<div class="window">
<table>
<tbody>
<tr>
<td>ColumnA</td>
<td>ColumnB</td>
</tr>
<tr>
<td>Stamatis</td>
<td>Engineer</td>
</tr>
<tr>
<td>Alex</td>
<td>Professor</td>
</tr>
</tbody>
</table>
</div>
CSS
table {
width: 100%;
background-color: red;
overflow-x: auto;
}
.window {
width: 100px;
height: 300px;
background-color: blue;
/* overflow: auto; */
}