Search code examples
javascriptcssgoogle-closure-library

Unwanted scroll bar on the left side of a div?


For some reason, there is a scroll bar on the left side of #mainView div inside this page. I really don't understand why. The problem seems to occur in pretty much all browsers. The scroll bar on the left side disappears once the right one is triggered.

The website


Solution

  • Before #mainView content is loaded, its width is null and its overflow property is set to scroll. So you have a 20px wide div with a lone scroll while waiting for content loading.

    You can either a width for #mainView or try overflow: auto.