4
Today, can we use CSS only to change the customization of the scrollbar of a DIV? If yes, how can I do it. Otherwise which script is best and how to use it?
4
Today, can we use CSS only to change the customization of the scrollbar of a DIV? If yes, how can I do it. Otherwise which script is best and how to use it?
4
Define styles for scrollbar
is a rarity, they are not part of the W3C standard for css, and therefore, most browsers simply ignore.
But there are Webkits
that allow customization, in my tests I could not find one that had support to all current browsers.
In the link above has an example, the same will work in Google Chrome, but in other as Firefox and IE will not take effect.
I searched the W3C
and found the following:
Currently, there is no form of scroll customization compatible with all browsers. Article W3C Mentions at the end the following statement on Friday 7 August 2015 18:50:04:
Some browsers (IE,konqueror) support properties that are not part of the default like scrollbar-shadow-color
, scrollbar-track-color
and others.
These properties are illegal, they are not defined in any specification CSS
nor are they identified as propriétárias (prefixing them with "-vendor-").
On this topic in Stackoverflow and addressed this issue and one of the most assertive approaches and use a plugin, some of them:
3
Using only CSS is possible to customize. But I believe that does not work in IE (no version).
At this link http://www.codeproject.com/Tips/674478/Customize-Scrollbars-using-CSS has the step by step all very well explain and with link to download the source code.
The ideal would be to apply this only to content within your website, as we can see here http://manos.malihu.gr/repository/custom-scrollbar/demo/examples/complete_examples.html.
Browser other questions tagged javascript jquery html css css3
You are not signed in. Login or sign up in order to post.
Gabriel, you gave exactly the same answer that in another question. I think it would be a case of marking the question as duplicate or adapting the answer to be more exact to the AP problem.
– Sergio
@Sergio the scrollbar works the same way on
div
so it would be better to mark it as duplicate even.– Gabriel Rodrigues