We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Firefox Custom Sidebar Width using CSS [Solved]

  • 6 个回答
  • 0 人有此问题
  • 1 次查看
  • 最后回复者为 cVcFireFox

more options

tried searching for this but unfortunately i didn't find any relevant posts

trying to set the sidebar width using the 'userChrome.css' file

the css file path is;

C:\Users\username\AppData\Roaming\Mozilla\Firefox\Profiles\bjf0cg2g.default-release\chrome\

userChrome.css

the css is;

  1. sidebar { min-width:34px !important; max-width:34x !important; }


appreciate any feedback because there seems to be an issue with the above

tried searching for this but unfortunately i didn't find any relevant posts trying to set the sidebar width using the 'userChrome.css' file the css file path is; C:\Users\username\AppData\Roaming\Mozilla\Firefox\Profiles\bjf0cg2g.default-release\chrome\ userChrome.css the css is; #sidebar { min-width:34px !important; max-width:34x !important; } appreciate any feedback because there seems to be an issue with the above

由cVcFireFox于修改

所有回复 (6)

more options

See:

Override the existing rules by adding the !important flag.

#sidebar-box {
	min-width: 14em;
	max-width: 36em;
	width: 18em;
}

more options

much appreciated!

more options

this doesn't appear to be working either which suggests that the issue is this end

ff 113.0.2 (x64) win 10

the search box might be forcing the re-size css to fail?

(the image is an example of the many combinations attempted)

由cVcFireFox于修改

more options

I'm not sure what width you want as 3em is rather small and you won't see much. The code works for me.

In Windows saving the file is usually the only time things get more complicated because Windows can silently add a .txt file extension and you end up with a file named userChrome.css.txt. To avoid this you need to make sure to select "All files" in the dialog to save the file in the text editor using "Save File as".

You need to close (Quit/Exit) and restart Firefox when you create or modify the userChrome.css file.

More info about userChrome.css/userContent.css in case you are not familiar: *https://www.userchrome.org/what-is-userchrome-css.html

In Firefox 69 and later you need to set this pref to true on the about:config page to enable userChrome.css and userContent.css in the chrome folder.

more options

ah ok, didn't know about the config being set to true so that's for that : )

the resizing has however, caused a new search for another setting in the userChrome file

in the image below, resizing the sidebar causes the 'tab's close icon' to hover over the tab, making it impossible to navigate through the sidebar tabs

removing the text from the tab(s) in the sidebar

removing the close tab function/icon from the sidebar [edit] solved

由cVcFireFox于修改

more options

update: just in-case this is useful for anyone else, i've managed to complete the task at hand

I installed a few add-ons sidebery => https://addons.mozilla.org/en-US/firefox/addon/sidebery/ new tab button => https://addons.mozilla.org/en-US/firefox/addon/new-tab-button-we/ close tab button => https://addons.mozilla.org/en-US/firefox/addon/close-the-tab-button/

i set the about:config to be able to read the userChrome.css file about:config => toolkit.legacyUserProfileCustomizations.stylesheets = true

i used the sidebar settings to remove the 'close tab' function

sidebar settings => tab => show close button on mouse over 'off'

this is the css from the image

/* makes sidebar adjustable */

  1. sidebar-box {

min-width: 1em !important; max-width: 36em !important; }

/* hides the native tabs */

  1. TabsToolbar {
 visibility: collapse;

} /* leaves space for the window buttons */

  1. nav-bar {
   margin-top: -8px;
   margin-right: 74px;
   margin-bottom: -4px;

}



Thanks to the support from cor-el!



the image show the browser using the sidebar to navigate open tabs, removes the default tabs from the top of the page and creates 3 separate panels to house each open tab

由cVcFireFox于修改