In Chrome and Safari, the vertical scroll bar appears below HTML content on the page, like so:
I fiddled with ::-webkit-scrollbar
, but the closest i could get was change the scroll bar width to 0px
. The div of that section is:
.displayContent { min-width:620px; width:100%; height:auto; overflow:hidden; }
This occurs in Safari (but not mobile Safari on iOS) and Chrome. Firefox is fine. I also tried fiddling with overflow as well, but could not get the results i wants.
Suggestions?
The easy fix is to use width: 100% instead. Percentages don't include the width of the scrollbar, so will automatically fit. If you can't do that, or you're setting the width on another element, add overflow-x: hidden or overflow: hidden to the surrounding element to prevent the scrollbar.
Web browsers do not take into account the width of the scrollbar on the side of a page when computing width values, so since we have a page that is longer than a single viewport, part of our page is being rendered behind the vertical scroll bar, causing the browser to display a horizontal scroll bar.
For example, you may size a Web browser window so that it takes up only half of your monitor's available width. This action causes a horizontal scroll bar to appear because page content can't fit in such a narrow space.
Horizontal scroll bar appearing at the bottom of screen.
Had a similar Problem.
The Problem is in the html{}
If you use something like this
html {
height: 100%;
width: 100%;
overflow: hidden;
}
Than the overlay effect on the scrollbar apears. Remove the overflow on the style for the html and put it into the body styling and it should work.
Try this -
html, body {
height:100%;
width:100%;
overflow:auto;
}
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