jayasiinput
jayasiinput

Reputation: 91

resize scroll bar width in internet explorer

I am new to stackoverflow.

I need to resize the scrollbar width and height.

I tried in many ways, I can get only changing its color but not resizing.

Upvotes: 7

Views: 29255

Answers (2)

Frank
Frank

Reputation: 1056

Although this is a fairly old question. MSIE has a feature which allow the scrollbars to hide when not being used. This is very similiar to the scrollbars OSX lion introduced. Plain CSS , NO JS.

  body {

  scrollbar-base-color: #222;
  scrollbar-3dlight-color: #222;
  scrollbar-highlight-color: #222;
  scrollbar-track-color: #3e3e42;
  scrollbar-arrow-color: #111;
  scrollbar-shadow-color: #222;
  scrollbar-dark-shadow-color: #222; 
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

The example above shows adding custom scrollbars to MSIE and then having them hidden when out of focus with the -ms-autohiding-scrollbar property.

  • Note - you can have different scrollbar behaviors for different parts of your site by targeting and #id or .class instead of body.

Upvotes: 4

Gromo
Gromo

Reputation: 1609

There is no CSS way to change style of browser scrollbars, except webkit-based browsers (Google Chrome, Safari, new Opera). So to make custom scrollbar you have to emulate it with js. There are lots of jQuery plugins - some better, some worse, some matches your needs, some - not. Try these: jQuery Scrollbar, jScrollPane, Malihu Custom Scrollbar

Upvotes: 4

Related Questions