JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<table>
<tr>
<td><p tabindex="0">Test</p></td>
</tr>
</table>
</div>
CSS
TABLE {
border-left: 20px solid blue;
border-right: 20px solid blue;
table-layout: fixed;
}
p {
width: 1000px;
}
DIV {
overflow: auto;
}
JavaScript
document.querySelector("P").focus();
document.querySelector("div").scrollTop = 0;
document.querySelector("div").scrollLeft = 0;