I am trying to be able to scroll inside one div but without showing the actual scrollbar.
I need the user to be able to scroll using the scrollwheel
Does anyone have ideas as to how I can accomplish this?
Thanks!
I am trying to be able to scroll inside one div but without showing the actual scrollbar.
I need the user to be able to scroll using the scrollwheel
Does anyone have ideas as to how I can accomplish this?
Thanks!
Maybe you can use css and hide or do some styling with it so it looks hidden. Here's one some links I found.
http://css-tricks.com/custom-scrollbars-in-webkit/
http://www.yourhtmlsource.com/stylesheets/scrollbars.html
This was tested in IE and Firefox - both handle padding a little differently, so I am using height and width to account for content visibility.
It makes sense to have 2 containers - one for the container and one for the content, however since browsers handle padding differently, it's a lot harder than you think to push the scrollbar into the hidden area. This is where the third container comes in:
This is accomplished through stylesheet tricks - the stylesheet has been commented so you can follow the instructions / comments in there.
Hope this helps! :)
Well, the real reason would be why you would want that, but since you asked I will try and solve your issue.
You will need two divs. One nested inside the other.
You will then need some CSS to help this situation out. The overflow:auto will give you the scrolling once it goes past the height limitations. I put on an random width for sake of the example. Putt a padding on the right hand side to push the scroll bar out of the .outer div class. This way you won't have to worry about the content going under the .outer div.
for the outer class you will need to specify the same height, same width, but overflow:hidden.
EXAMPLE: jsFiddle