1

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?

1
  • Share your code that is having the issue. Then only some helpful solution can be provided. Without code, only guesswork solutions only can be provided. Commented Apr 21, 2021 at 6:58

3 Answers 3

2

Guesswork solution:

body {   overflow: hidden;  }

https://developer.mozilla.org/de/docs/Web/CSS/overflow

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.