Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Scroll bar always visible on new tab page

  • 6 回覆
  • 2 有這個問題
  • 11 次檢視
  • 最近回覆由 kaalakiota

more options

Pretty much what the title says - I always have a scrollbar on new tab page, whether or not the content fits in the viewport. It's not so obvious with light theme, but with dark theme there's a glaringly obvious light (greyed out, because it does nothing) scroll bar. I'm fairly confident this shouldn't be here, but not sure why it is.

Pretty much what the title says - I always have a scrollbar on new tab page, whether or not the content fits in the viewport. It's not so obvious with light theme, but with dark theme there's a glaringly obvious light (greyed out, because it does nothing) scroll bar. I'm fairly confident this shouldn't be here, but not sure why it is.

被選擇的解決方法

By default, a scroll bar will appear when the content is too long. Page authors can override this in a number of ways, for example:

  • overflow-y: hidden => cut off content that is too long
  • overflow-y: scroll => always show a scroll bar even when it's not needed

The new tab page has the second of those.

It is possible to override that by creating your own custom style rule in an optional userContent.css file. But I guess you would need to find it really annoying to go to the effort.

Something like the following should do it, although I haven't set it up in my own userContent.css file for testing:

/* New Tab Page: No vertical 
   scroll bar unless needed */
body.activity-stream {
  overflow-y: auto !important;
}
從原來的回覆中察看解決方案 👍 1

所有回覆 (6)

more options

Image didn't attach to the original post - attached here

more options

選擇的解決方法

By default, a scroll bar will appear when the content is too long. Page authors can override this in a number of ways, for example:

  • overflow-y: hidden => cut off content that is too long
  • overflow-y: scroll => always show a scroll bar even when it's not needed

The new tab page has the second of those.

It is possible to override that by creating your own custom style rule in an optional userContent.css file. But I guess you would need to find it really annoying to go to the effort.

Something like the following should do it, although I haven't set it up in my own userContent.css file for testing:

/* New Tab Page: No vertical 
   scroll bar unless needed */
body.activity-stream {
  overflow-y: auto !important;
}
more options

Oh, I didn't see your screenshot. Is that dark page theme built-in or added on?

more options

Thanks for the quick reply. That's just the built-in dark theme - it doesn't look good with the light W10 system scrollbars, hence me thinking that this was an issue rather than a deliberate choice for the css property to be set like that on the new tab page.

The css snippet you posted does the trick though!

more options

You may have accidentally zoomed web page(s). Reset the page zoom on pages that cause problems.

  • View -> Zoom -> Reset (Ctrl+0/Command+0 (zero))
more options

cor-el said

You may have accidentally zoomed web page(s). Reset the page zoom on pages that cause problems.
  • View -> Zoom -> Reset (Ctrl+0/Command+0 (zero))

Hi, thanks for the suggestion - the new tab page wasn't zoomed though.

I'll mark this issue as closed since jscher2000's css does get rid of the scroll bar (which I prefer), and the "issue" itself is apparently by design