Reputation: 1407
I am trying to change the default scrollbar of my webpage with the help of a tutorial.
The issue is,that the scrollbar changes for the content we put inside a particular div tag and not of the entire page.For example in this demo the scrollbar has changed,but not of the enitire page. Can anyone please help me in changing the scrollbar of the entire page and merely a particular block of content
Thanks in advance.
Upvotes: 0
Views: 810
Reputation: 7092
You cant change the browser scroll bar in most browsers.
You can only have a cusom scroll bar on an element.
To work around this you need to use overflow.
html, body {
overflow:hidden;
}
Thios will disable the default scroll bar and behaviour.
Then you can use a wrapper element around all your content and apply the js to it.
Upvotes: 1