Im trying to remove the horizontal scroll.
Currently using "overflow-x: hidden;" does the job of hidden the scroll but its still actually functional if you were to use the tracker page etc. I'm thinking it would be best to disable it with Javascript, any ideas on what I could use?
Many thanks
Well, showing/hiding the scrollbars is a visual thing so in any ways, you're going to change the css to achieve this.
Now, if this is what you're asking, you can change the styles through javascript instead of using a stylesheet:
document.documentElement.style.overflowX = 'hidden';
document.documentElement.style.overflowY = 'hidden';
// or for an element
document.getElementById('mydiv').style.overflowX = 'hidden';
There isn't really another way beside using the css property in javascript like so:
document.documentElement.style.overflowX = 'hidden'; // horizontal scrollbar will be hidden
document.documentElement.style.overflowY = 'hidden'; // vertical scrollbar will be hidden
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With