JSFiddle - React, Tailwind, and code Playground
HTML
<div class="outer">
<h2>Inset Box with scroller</h2>
<div class="inner-content">
<table>
<tr>
<td>foo</td>
<td class="red">bar</td>
<td>foo</td>
</tr>
<tr>
<td class="red">bar</td>
<td>foo</td>
<td class="red">bar</td>
</tr>
<tr>
<td>foo</td>
<td class="red">bar</td>
<td>foo</td>
</tr>
</table>
</div><!-- inner-content ends -->
</div>
CSS
.outer {
width:500px;
padding:10px;
background:#ccc;}
h2 {text-align:center}
/* inner content styles */
.inner-content {
width:400px;
height:300px;
overflow:auto;
margin:0 auto;
padding: 0;
background:#fff;
box-shadow: 0 0 10px #000000 inset;
}
.inner-content td {
line-height: 11em;
min-width: 11em;
text-align: center;
}
.red {
background: #f00;
}