Is there a way using css to hide a scrollbar while still keeping its functionality? Even make it transparent or the same color of the background will be fine. Do I have to do this in JavaScript?
1. Set the overflow of the parent div as hidden. 2. Set the overflow of the child div to auto and the width 200% (or anything more than 100%, or more than the width of the parent - so that the scrollbar gets hidden).
On top of this for browser compatibility on the parent element you will need to apply text-align: center; which will apply the needed centering of the element. As for preventing scrolling on the div, all you need to apply on the footer is overflow: hidden; and that should do the trick.
The second fiddle only scrolls horizontally, you can hold shift and then use mouse scroll to go left and right. I have also tested this in chrome and it works fine for me.
Select " Display " on left and scroll down to " automatically hide scroll bars in Windows " . Now Enable it.
.className {
overflow: auto;
overflow-y: hidden;
}
The user will have to scroll using the mouse wheel I believe
Compatible with IE too...
<div style="width: 500px; height: 500px; overflow: hidden;"></div>
Source: http://www.w3schools.com/css/pr_pos_overflow.asp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With