Export (0) Print
Expand All

scrollbar-base-color property

Specifies the base color of the main elements of a scroll bar.

Internet Explorer 9

 

Syntax

scrollbar-base-color: variant

Property values

variant

A VARIANT that specifies or receives any color name or RGB values in the Color Table.

CSS information

Applies ToAll elements
Mediavisual
Inherited1
Initial Valuedepends on user-agent

Standards information

There are no standards that apply here.

Remarks

Windows Internet Explorer 8. The -ms-scrollbar-base-color attribute is an extension to CSS, and can be used as a synonym for scrollbar-base-color in IE8 Standards mode.

The scroll box is the square box within a scroll bar that can be moved either up and down or left and right on a track to change the position of the content on the screen. The scroll arrows, located at each end of a scroll bar, are the square buttons containing the arrows that move the content on the screen in small increments, either up and down or left and right.

This property applies to elements that display a scroll bar. Cascading Style Sheets (CSS) enable scrolling on all objects through the overflow property. These objects are not listed in the Applies To list for this property.

Examples

This example uses scrollbar-base-color and scrollbar-arrow-color to create two div objects with different scroll bar color schemes.


div {
  width: 150px;
  height: 150px;
  border-style: solid;
  border-width: thin;
  overflow-y: scroll;
  font-family: sans-serif;
  float: left;
  margin-right: 10px;
}
.aquaScroll {
  scrollbar-base-color: aqua;
  scrollbar-arrow-color: blue;
  border-color: blue;
}
.bisqueScroll {
  scrollbar-base-color: bisque;
  scrollbar-arrow-color: red;
  border-color: red;
}


<body>
  <div class="aquaScroll">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  </div>
  <div class="bisqueScroll">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  </div>
</body>

The following image shows the result. Note that scrollbar-base-color sets the scroll bar face color and highlight color to different shades of the same base color:

An image showing two div objects with different scroll bar color schemes.

See also

currentStyle
defaults
runtimeStyle
style
Reference
-ms-scrollbar-3dlight-color
scrollbar-arrow-color
-ms-scrollbar-darkshadow-color
scrollbar-face-color
-ms-scrollbar-highlight-color
-ms-scrollbar-shadow-color
-ms-scrollbar-track-color

 

 

Show:
© 2014 Microsoft