CSS scrollbar-color Property Last Updated : 09 Oct, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report The scrollbar-color CSS property sets the colors of the scrollbar track and thumb, allowing for customization of the scrollbar's appearance. The thumb, the draggable part, can be styled globally by setting the property on the root element.Syntaxscrollbar-color: auto | color | dark | light | initial | inherit; /* scrollbar-color: dark-shadow light-shadow; */Property ValuesPropertyDescriptionautoSets the scrollbar color to the browser's default. It is the default value for rendering the scrollbar.colorSets the scrollbar color to custom values. The first value applies to the scrollbar thumb, and the second applies to the scrollbar track.lightProvides a lighter variant of the scrollbar, based on default or custom colors. Discontinued in all major browsers.darkProvides a darker variant of the scrollbar, based on default or custom colors. Discontinued in all major browsers.initialResets the scrollbar color to its default value.inheritInherits the scrollbar color from its parent element.Examples of CSS scrollbar-color PropertyExample: Here we are using the scrollbar-color property set to 'auto' in a styled container. html <!DOCTYPE html> <html> <head> <title> CSS scrollbar-color </title> <style> .scrollbar-auto { scrollbar-color: auto; height: 150px; width: 200px; overflow-y: scroll; background-color: lightgreen; } </style> </head> <body> <h1 style="color: green"> GeeksforGeeks </h1> <b> CSS | scrollbar-color </b> <p> The container below has scrollbar-color set to 'auto'. </p> <div class="scrollbar-auto"> GeeksforGeeks is a computer science portal with a huge variety of well written and explained computer science and programming articles, quizzes and interview questions. The portal also has dedicated GATE preparation and competitive programming sections. </div> </body> </html> Output:scrollbar-color: auto:Example 2: Here the scrollbar-color property, setting the scrollbar to red for the thumb and green for the track, within a light green container. html <!DOCTYPE html> <html> <head> <title> CSS scrollbar-color Property </title> <style> .scrollbar-colored { scrollbar-color: red green; height: 150px; width: 200px; overflow-y: scroll; background-color: lightgreen; } </style> </head> <body> <h1 style="color: green"> GeeksforGeeks </h1> <b> CSS | scrollbar-color </b> <p> The container below has a red green scrollbar-color. </p> <div class="scrollbar-colored"> GeeksforGeeks is a computer science portal with a huge variety of well written and explained computer science and programming articles, quizzes and interview questions. The portal also has dedicated GATE preparation and competitive programming sections. </div> </body> </html> Output:scrollbar-color: color color;Supported Browsers: The browser supported by value attribute in option tag are listed below:Google ChromeEdgeFirefoxOperaSafari Comment More infoAdvertise with us Next Article CSS scrollbar-color Property S sayantanm19 Follow Improve Article Tags : Web Technologies CSS Web technologies CSS-Properties Similar Reads CSS scrollbar-width Property The CSS scrollbar-width property defines the thickness of a scrollbar in an element, allowing developers to adjust its appearance to better fit the webpage design. It offers three main values: auto for the default scrollbar width, thin for a narrower scrollbar, and none to completely hide the scroll 5 min read CSS color Property The color property is used to specify the text color. It accepts color values as color name, HEX, RGB, RGBA, HSL, or HSLA values. This property plays a crucial role in defining text appearance, ensuring readability, and enhancing the overall design aesthetics of web content.Syntaxcolor: color | init 3 min read CSS scroll-margin-block property The scroll-margin-block property is used to set all the scroll margins to the start and end of a scroll element at once. This property is shorthand for the scroll-margin-block-start and scroll-margin-block-end property.The selection of the start and end sides depends upon the writing mode. The start 2 min read CSS column-rule Property The column-rule property in CSS is used to specify the width, style, and color of the rules between the columns.Syntax: column-rule: column-rule-width column-rule-style column-rule-color| initial|inherit;Property Values: column-rule-width: This value is used to set the width of the rule between the 3 min read CSS scroll-padding-block-start Property The scroll-padding-block-start property is used to set all the scroll padding to the start of a scroll container or element in the block dimension at once. The start side is the top side for horizontal-tb writing mode and right or left side for vertical-rl or vertical-lr writing mode respectively. W 2 min read Like