I am creating a front-end using bootstrap. I created it completely. But when I scroll it vertically, it scrolls a bit horizontally as well and it goes to a side. I want it to be fixed horizontally. I want to scroll it vertically only.
Before it goes to a side
After it goes to a side
I tried to figure this out in many ways. But I failed. What should I do to stop this scrolling horizontally?
You have to hide overflow property of 'x' axis of body or your relevant element.
overflow-x: hidden;
overflow-y: auto;
'overflow-y: auto' is more user friendly than 'scroll'.
use this to hide scrolling in x- direction
overflow-x:hidden;
overflow-y:scroll;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With