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

搜索 | 用户支持

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

详细了解

How can I reduce idiotically big line spacing in bookmark sidebar?

  • 4 个回答
  • 1 人有此问题
  • 2 次查看
  • 最后回复者为 Barubiito

more options

Could you please explain in detail, how to use UserChrome.css (what to do), if you want to reduce line spacings?

Could you please explain in detail, how to use UserChrome.css (what to do), if you want to reduce line spacings?

所有回复 (4)

more options

You can try this code to the userChrome.css file below the default @namespace line. You can adjust the height and margin-top settings to suit your needs.


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

/* Line height for treechildren */
:-moz-any(#bookmarks-view, #historyTree, #editBMPanel_folderTree, #placesList, #placeContent)
treechildren::-moz-tree-row {
  margin-top: -1px !important;
  min-height: 14px !important;
  height: 14px !important;
}

You need to create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist.

  • use a plain text editor (Windows: Notepad; Mac: Textedit) to create a (new) userChrome.css file in the chrome folder (file name is case sensitive)
  • paste the code in the userChrome.css file in the editor window
  • make sure the userChrome.css file starts with the default @namespace line

If you are on Windows:

  • make sure you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css

Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.css.txt file.

  • make sure you do not have a double .css.css file extension (userChrome.css.css.css) if it is still not working
more options

I'm on a Mac. I had tried this already and it didn't work. I tried adding the code from above, but closed Firefox and reopened it and it still didn't work.

I think I have it in the right place. (username)/Library/Mozilla/chrome/userChrome.css. I don't understand why it's not working.

more options

@ Barubiito

You need to create the chrome folder in the Firefox profile folder and place userChrome.css in this folder.

  • ~/Library/Application Support/Firefox/Profiles/<profile>/

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

more options

OK, now it works, thanks! I see now that I skimmed the linked page about the Profile folder too quickly and fundamentally misunderstood it. I read "profile folder" as being my user profile on my Mac, and took "~/Library/Mozilla/" to be where I should put the Chrome folder.

Thanks again.