Reputation: 25
I am using html/css/js to make a website but a scroll is appering because of some effects I added. But I don't want a user to see the scrollbar or even scroll with middle mouse button. What can I do to solve this problem?
Upvotes: 1
Views: 112
Reputation:
you can use in CSS
overflow:hidden
https://developer.mozilla.org/de/docs/Web/CSS/overflow
or if you want to have scrolling but you can hide it
/* Hide scrollbar for Chrome, Safari and Opera */
.example::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.example {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_hide_scrollbar_keep_func
Upvotes: 0
Reputation: 51
Guesswork solution:
body { overflow: hidden; }
https://developer.mozilla.org/de/docs/Web/CSS/overflow
Upvotes: 1
Reputation: 71
you can use css for this problem if you don't want the scroll to appear
overflow: hidden;
for more you can refer this overflow
Upvotes: 0