0

I have a div as <div id="content"> with some <p> tags within it. I am setting the style for div as follows:

#content{
     height:200px;
     overflow-y:scroll;
}

Is there a way I can customize the scrollbar. I mean I want to change the scrollbar color as well as its background.

2 Answers 2

1

There is no valid cross-browser code, which is capable of coloring the scrollbars. You should respect the UI configuration of the users who are visiting your page.

Maybe you want to have jQuery scrollbars, which are fully customizable: http://www.net-kit.com/jquery-custom-scrollbar-plugins/

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

Comments

0

Scrollbars are generated through the OS and you have little control over them.

It's why people have made custom scrollbar, generated in javascript.

There are a lot of ressource for the little customizing you can do, just google it.

IIRC, you can only modify IE scrollbars via stuff like

scrollbar-3dlight-color:#ffd700;
scrollbar-arrow-color:#ff0;
scrollbar-base-color:#ff6347;
scrollbar-darkshadow-color:#ffa500;
scrollbar-face-color:#008080;
scrollbar-highlight-color:#ff69b4;
scrollbar-shadow-color:#f0f;

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.