views:

67

answers:

4

I was able to disable vertical scrollbars in a grid by setting the CSS property overflow-y: hidden. However, this removed the ability to scroll the contents with the mouse wheel as well.

Is there a way to not show the scrollbars but still allow the contents to be scrolled through mouse wheel or arrow keys?

+6  A: 

Same question

http://stackoverflow.com/questions/1326570/how-to-disable-browser-or-element-scrollbar-but-let-scrolling-with-weel-or-arrow

Richa
hope it will help you! :)
Richa
A: 

Apparently you add a code in the css file to make these scroll bars not show.

/Don't show scrollbar on IE/

body{

overflow: hidden;

}

/* Use one of the body property to hide the scroll-bar of browser.

You'll need to hit refresh and/or clear your cache in your web browser. Remove cache and cookie of the browser.

All the Best !!!

Rahul Patil
A: 

You could use jScrollPane which allows you to replace the browser scrollbars with custom ones:

http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html

Since you can style these custom scrollbars with CSS you could easily make them disappear (try something like: .jScrollPaneTrack { display: none; })

vitch
A: 

There are Javascript methods, see the thread you duplicated.

A better solution is to set the target div to overflow:scroll, and wrap it inside a second element that is 8px narrower, who's overflow:hidden.

The target element will have a hidden scrollbar. The mousewheel will work, but the scroll bar will not show.

<div style='overflow:hidden; width:200px;'>
   <div style='overflow:scroll; width:208px'>
      My mousewheel scrollable content here....
   </div>
</div>

Note that 8px as the width of the scrollbar is a random number - it's probably a lot more, and it could require per browser CSS.

Still better than JS in my book.

SamGoody