The vertical bar does not appear in IE8 if the page is not long enough. In FF, there is a workaround for this
html {
overflow: -moz-scrollbars-vertical;
}
I tried the following for IE8: overflow:scroll;
but the scroll bar appears on both sides. I want it only for vertical and not horizontal. scroll-y does not work.
Any solution?
To show the scrollbars always on the webpage, use overflow: scroll Property. It will add both horizontal and vertical scrollbars to the webpage. To add only horizontal scrollbar use overflow-x: scroll property and for vertical scrollbar use overflow-y: scroll property.
For vertical scrollable bar use the x and y axis. Set the overflow-x:hidden; and overflow-y:auto; that will automatically hide the horizontal scroll bar and present only vertical scrollbar. Here the scroll div will be vertically scrollable.
Add CSS. Set the overflow property to “auto”. This value adds scrollbar when the content overflows. Set the width and height of the <div>.
Oh figured it. Its
body {
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