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 技術支援網站

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

了解更多

Any way to change the color of individual Bookmark folders?

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

more options

I use the Bookmarks Bar extensively. But all the folders are the same color. I would find it much easier to find things quickly if I could change individual folder colors.

Any way to do this?

I'm already using Jscher's excellent UserChrome script to make the folders an attractive yellow, instead of gray. But can this be done for individual foders?

I use the Bookmarks Bar extensively. But all the folders are the same color. I would find it much easier to find things quickly if I could change individual folder colors. Any way to do this? I'm already using Jscher's excellent UserChrome script to make the folders an attractive yellow, instead of gray. But can this be done for individual foders?

被選擇的解決方法

You can experiment with code like this in the userChrome.css file. Use suitable color for the #rrggbb property values. You can omit the color properties. If you do not use the !important flag then you get the usual hovering effects.


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

#PlacesToolbarItems > .bookmark-item[container] {font-weight: 600; padding-top: 5px !important}
#PlacesToolbarItems > .bookmark-item[container] {background-color: #f4f4ff;}

#PlacesToolbarItems > .bookmark-item[container][label="xx" i]       {background-color: #rrggbb; color: #rrggbb}
#PlacesToolbarItems > .bookmark-item:not([container])[label="xx" i] {background-color: #rrggbb; color: #rrggbb}

[label="xx] needs to be an exact match and [label="xx" i] means ignore case. You can use [label^="xx"] and [label*="xx"] for individual bookmarks with similar labels.

從原來的回覆中察看解決方案 👍 1

所有回覆 (8)

more options

Go to the Mozilla Add-ons Web Page {web Link} (There’s a lot of good stuff here) and search for what you want.

more options

Thanks for the suggestion, but I've looked and there is no add-on for this!

more options

I called for more help.

more options

選擇的解決方法

You can experiment with code like this in the userChrome.css file. Use suitable color for the #rrggbb property values. You can omit the color properties. If you do not use the !important flag then you get the usual hovering effects.


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

#PlacesToolbarItems > .bookmark-item[container] {font-weight: 600; padding-top: 5px !important}
#PlacesToolbarItems > .bookmark-item[container] {background-color: #f4f4ff;}

#PlacesToolbarItems > .bookmark-item[container][label="xx" i]       {background-color: #rrggbb; color: #rrggbb}
#PlacesToolbarItems > .bookmark-item:not([container])[label="xx" i] {background-color: #rrggbb; color: #rrggbb}

[label="xx] needs to be an exact match and [label="xx" i] means ignore case. You can use [label^="xx"] and [label*="xx"] for individual bookmarks with similar labels.

more options

Thanks so much Cor-el! I'll give this a try and let you know how I got on. Thanks! :-)

more options

Cor-el! THANK YOU! This script worked beautifully! This has made me SO HAPPY! Thank you! :-)

Not important, but I don't suppose you know a script for the rollover color? Or the folder icon color?

Also, the script you gave contained a line with "bookmark-item:not" - what does the "not" one do?

more options

[container] means that the rule applies to a container (folder). not([container]) means that the rule applies to a normal bookmark (i.e. not a folder).

For rollover you can use the :hover pseudo class selector.

#PlacesToolbarItems > .bookmark-item[container][label="xx"]:hover {...}

You probably need to use the !important flag to override existing rules.

more options

on the same subject, how can i give a color to folders that i create on the bookmark bar ?