+ 3

How to hide vertical scroll bar in HTML?

I know about overflow-y: hidden but that will remove my content also I mean I can't scroll the content. I just want to hide the scrollbar not the content. Anybody know about this? I know it is possible watch YouTube website there I get the idea. please help......😃

18th Apr 2017, 2:28 PM
Swarnab Das
Swarnab Das - avatar
9 Réponses
+ 7
element{ overflow-y:scroll; } element::-webkit-scrollbar{ display:none;/*width:0em is better*/ } That is the correct way But tha As you didn't tag "css".idk that did you talking about css or not....-_-
18th Apr 2017, 5:04 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 5
element::-webkit-scrollbar{ display:none; } In old version of browser can do this. The new version not sure I test it now
18th Apr 2017, 4:18 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 3
hey Cimpoisu Mihali what is that oh! god please help me......
18th Apr 2017, 4:24 PM
Swarnab Das
Swarnab Das - avatar
+ 3
Mihali are u kidding with me!
18th Apr 2017, 4:35 PM
Swarnab Das
Swarnab Das - avatar
0
The vertical scroll is automatically generated by the browser you test the script, so don't worry
18th Apr 2017, 4:10 PM
certreq
certreq - avatar
0
All right I'll check out for a solution
18th Apr 2017, 4:19 PM
certreq
certreq - avatar
0
Oh thanks God we have the power of CSS: <style> .bloc { display:inline-block; vertical-align:top; overflow:hidden; border:solid grey 1px; } .bloc select { padding:10px; margin:-5px -20px -5px -5px; } </style> <!-- Années --> <div class="bloc"> <select name="year" size="5"> <option value="2010" >2010</option> <option value="2011" >2011</option> <option value="2012" SELECTED>2012</option> <option value="2013" >2013</option> <option value="2014" >2014</option> </select> </div> Hope I helped :)
18th Apr 2017, 4:22 PM
certreq
certreq - avatar
0
This is CSS. First, you should paste the code first in <body> tag and you are all set. If that doesn't work, then put it in head tag and then if that doesn't work...well you are screwed
18th Apr 2017, 4:29 PM
certreq
certreq - avatar
0
add a div and id to it and then go to the css and use the visibility tag
18th Apr 2017, 5:38 PM
Jacob Richardson
Jacob Richardson - avatar