Without using the fully functional CSS overflow-x property, you can resize the content to not require a scrollbar, through javascript or using HTML / CSS design.
You can also do this:
window.onscroll = function () { window.scrollTo(0,0); }
... that will detect any scrolling and automatically return the scroll to the top / left. It should be mentioned that doing something like this for sure can interfere with your users.
It’s best to create an environment in which unwanted user interface elements are completely absent (through CSS, through design). The above approach shows unnecessary user interface elements (scroll bars) and then makes them work differently than the user expects (page scrolling). You have "broken the contract" with the user - how can they trust that the rest of your website or application will do the expected events when the user takes a familiar action?
Chris baker
source share