Reputation: 643
I've put:
body {
height: 100%;
width: 100%;
max-height: 100%;
max-width: 100%;
overflow: hidden;
}
But I can still use my Middle Button to scroll down the page. Is there any fix for this?
I've also tried to search for the jQuery middle mouse button scroll event but didn't find anything.
Upvotes: 1
Views: 4012
Reputation: 154
If you're still able to scroll, the issue may not be the body
tag, but the html
tag taking up more than 100%, try this as well, it resolved a similar issue for me:
html {
overflow: hidden;
height: 100%;
}
Upvotes: 3
Reputation: 1284
Try to use overflow-y instead. Like this
body {
overflow-y:hidden;
}
Upvotes: 2
Reputation: 3778
You can prevent middle mouse clicks, so you wont be able to scroll:
$(document).mousedown(function(e){
switch(e.which)
{
case 2:
//middle Click
return false;
break;
}
return true;// to allow the browser to know that we handled it.
});
Upvotes: 1