1

What is the most effective way to have scrollbars on a website to a custom style using CSS?

I'm talking about scrollbars within a DIV with overflow: scroll; set and not on the browser window maybe using a JPG as the scrollbar design.

Hope this explains what I'm trying to achieve.

Thanks

2 Answers 2

3

The scrollbar is a component of the OS, so the browser doesn't give you any liberty for styling it. The best alternative is using Javascript, there are some good libraries for custom scrollbars, Tiny Scrollbar, for example.

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

Comments

2

At the moment you can redraw scrollbars with pure CSS only on webkit browsers:

For other browsers you've to use workarounds, using javascript to emulate the scrolling effect. Some resources:

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.