Ok for some reason my webpage scrolls from left to right and shows a lot of ugly space.
I have searched for results but they just made the scrollbar HIDDEN
That's now what I want, I want to physically DISABLE the horizontal scroll feature. I do not want the user to be able to scroll left to right on my page just up and down!
I have tried: overflow-x:hidden
in css on my html
tag but it only made the scrollbar hidden and did not disable the scroll.
Please help me!
Here is a link to the page: http://www.green-panda.com/usd309bands/ (Broken link)
This might give you a better idea of what I am talking about:
This is when the first pages loads:
And this is after I scroll to the right:
You can override the body scroll event with JavaScript, and reset the horizontal scroll to 0.
I don't advise doing this because it limits functionality for users with small screens.
You can try this all of method in our html page..
1st way
2nd way You can use the following in your CSS body tag:
That will remove your scrollbar.
3rd way
5th way
6th way
4th way..
Now i m searching about more..!!!!
koala_dev answered that this will work:
And MarkWPiper comments that ":-/ Caused touch / momentum scrolling to stop working on iPhone"
The solution to keep touch / momentum on iPhone is to add this line inside the css block for html,body:
If you want to disable horizontal scrolling over the entire screen width, use this code.
This works better than "100%" because it ignores the parent width and instead uses the viewport.
I just had to deal with it myself. After all I found this method most easy and useful. Just add
To your outer parent. In my case it looks like this:
You have to use
overflow-x
because if you use simply useoverflow
you disable the vertical scrolling too, namelyoverflow-y
If the vertical scrolling is still disabled you can enable it explicitly with:
I know its somewhat not a proper way because if everything was setup well one would not have to use this quick and dirty method.
Try adding this to your CSS