Whenever the width of tables in my articles exceeds the available space in the webpage layout, I wanted to enable horizontal scrolling.
Despite trying to accomplish this with CSS alone, I was unsuccessful. As a result, I resorted to enclosing everything in a div using jQuery:
$('table.data').wrap('<div class="tcontain" />');
Subsequently, I implemented the following CSS:
.tcontain {
width: 100%;
overflow-x: scroll;
}
While this solution works, I am seeking a way to achieve this without the use of JavaScript. Any assistance would be greatly appreciated!