Nithesh Narayanan
Nithesh Narayanan

Reputation: 11765

Disabling browser scrollbar

Hi Is it possible to disable browser scroll bar through java script...? If yes how?

Help me if anybody knows it... Thanks in advance..

Upvotes: 10

Views: 23387

Answers (5)

h34dsp1nns
h34dsp1nns

Reputation: 82

Here are other possible values for overflow

overflow = document.body.style.overflow

/* Keyword values */
overflow: "visible";
overflow: "hidden";
overflow: "clip";
overflow: "scroll";
overflow: "auto";
overflow: "hidden visible";

/* Global values */
overflow: "inherit";
overflow: "initial";
overflow: "revert";
overflow: "unset";

Upvotes: 0

Anish Joseph
Anish Joseph

Reputation: 1026

ya sure you can disable browser scroll bar just give overflow hidden for body tag using css and javascript

or just put an id for the body tag and use

eg HTML

<body id="page">

JAVASCRIPT

 document.getElementById( "page" ).style.overflow= "hidden";

Upvotes: 4

Mudassir
Mudassir

Reputation: 13174

Use the following snippet;

document.body.style.overflow = "hidden";

Upvotes: 3

rahul
rahul

Reputation: 187050

CSS

body
{
    overflow: hidden;
}

javascript

document.body.style.overflow = "hidden";

jQuery

$("body").css('overflow', 'hidden');

Upvotes: 31

Chinmayee G
Chinmayee G

Reputation: 8117

Use this CSS

body {
   overflow:hidden;
}

Upvotes: 9

Related Questions