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

搜尋 Mozilla 技術支援網站

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

了解更多

How to use userChrome.css to move favicon and text on tabs up 3px and left 2px

  • 2 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 Gojira

more options

I would like to control the positioning of the favicon and text which appears on the tabs. I'm hoping this will be possible by using userChrome.css. Also, would it be possible to reduce the height of the background behind the tabs with userChrome.css?

My goal is basically to reduce the height of the tabs and the background behind the tabs.

Thanks

I would like to control the positioning of the favicon and text which appears on the tabs. I'm hoping this will be possible by using userChrome.css. Also, would it be possible to reduce the height of the background behind the tabs with userChrome.css? My goal is basically to reduce the height of the tabs and the background behind the tabs. Thanks

被選擇的解決方法

You can find the relevant code for the tab bar height in this file that you can open via the location bar.

  • chrome://browser/skin/browser.css

I use code like this to adjust the height:

@namespace url("https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

/* Tab bar: adjust height - chrome://browser/skin/browser.css */
#tabbrowser-tabs,
.tab-background-start[selected=true]::after,
.tab-background-start[selected=true]::before,
.tab-background-start,
.tab-background-end,
.tab-background-end[selected=true]::after,
.tab-background-end[selected=true]::before {
  min-height: 24px!important;
}
#tabbrowser-tabs {height:26px!important;}
#tabbrowser-tabs toolbar button > .toolbarbutton-icon { padding-bottom:2px !important; }

For the icon and the text you can modify the padding or margin of those elements with these selectors:

.tab-text {padding-bottom:3px !important; }
.tab-throbber, .tab-icon-image  {padding-left:2px !important; }
從原來的回覆中察看解決方案 👍 2

所有回覆 (2)

more options

選擇的解決方法

You can find the relevant code for the tab bar height in this file that you can open via the location bar.

  • chrome://browser/skin/browser.css

I use code like this to adjust the height:

@namespace url("https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

/* Tab bar: adjust height - chrome://browser/skin/browser.css */
#tabbrowser-tabs,
.tab-background-start[selected=true]::after,
.tab-background-start[selected=true]::before,
.tab-background-start,
.tab-background-end,
.tab-background-end[selected=true]::after,
.tab-background-end[selected=true]::before {
  min-height: 24px!important;
}
#tabbrowser-tabs {height:26px!important;}
#tabbrowser-tabs toolbar button > .toolbarbutton-icon { padding-bottom:2px !important; }

For the icon and the text you can modify the padding or margin of those elements with these selectors:

.tab-text {padding-bottom:3px !important; }
.tab-throbber, .tab-icon-image  {padding-left:2px !important; }
more options

This has achieved exactly what I wanted!!!

Thank you for you help!!! d(^_^)