Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deactivate or remove the scrollbar on HTML

Tags:

I want to de-activate or remove the vertical scrollbar in an HTML page.
How to do that ?

Thanks.

like image 965
Wassim AZIRAR Avatar asked Jun 13 '10 23:06

Wassim AZIRAR


People also ask

How do you stop a scroll in CSS?

Disabling scroll with only CSS. There's another way to disable scrolling that is commonly used when opening modals or scrollable floating elements. And it is simply by adding the CSS property overflow: hidden; on the element you want to prevent the scroll.

How do I get rid of unnecessary scrollbar?

A quick fix is to add overflow: hidden to the CSS for your #footer . Note: A scrollbar will still appear if your #body content flows out of the the viewport. Show activity on this post. It will remove unnecessary scroll bars.

How can I hide scrollbar in iframe but still scroll?

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).


2 Answers

If you really need it...

html { overflow-y: hidden; } 
like image 80
meder omuraliev Avatar answered Oct 18 '22 07:10

meder omuraliev


What I would try in this case is put this in the stylesheet

html, body{overflow:hidden;} 

this way one disables the scrollbar, and as a cumulative effect they disable scrolling with the keyboard

like image 34
hndcrftd Avatar answered Oct 18 '22 07:10

hndcrftd