javascript - How to hide scroll bar but want to it keep working -


here code

#scroll{ overflow-y:scroll; max-height:500px; width:267px;} 

i explored on stackoverflow , got many answers explained 2 conatiners in html have 1 div , want apply on that. thanks

you should parent child approach recommended one. give element scroll bars, wrap in containing element, , make containing element element smaller, , give it:

overflow: hidden; 

in current scenario can pure css. hide scroll bars in webkit-based browsers (chrome , safari).

.element::-webkit-scrollbar { width: 0 !important } 

hide scrollbars in ie 10+.

.element { -ms-overflow-style: none; } 

hide scrollbars in firefox, has been deprecated.

.element { overflow: -moz-scrollbars-none; } 

jsfiddle


Comments

Popular posts from this blog

python - Specify path of savefig with pylab or matplotlib -

c# - SharpSsh Command Execution -

How to run C# code using mono without Xamarin in Android? -