This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Context Menu and Dropdown menu Colors

  • 6 replies
  • 2 have this problem
  • 18 views
  • Last reply by Mozzin

more options

Hi all, I've a question, I've searched anywhere without a solution.

I need to change the menu color from default gray (RGB 240 240 240) to white (RGB 255 255 255)

Please help me, this is for a visually impaired person.

Thank you in advance!

Hi all, I've a question, I've searched anywhere without a solution. I need to change the menu color from default gray (RGB 240 240 240) to white (RGB 255 255 255) Please help me, this is for a visually impaired person. Thank you in advance!

All Replies (6)

more options

Firefox has numerous different context menus. Based on a post on the mozillaZine forums (link), these custom style rules will give three of them a white background:

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#contentAreaContextMenu * {
    background-color: #fff !important;
}
#tabContextMenu * {
    background-color: #fff !important;
}
#placesContext * {
    background-color: #fff !important;
}

Custom style rules can be applied to Firefox using either a userChrome.css file (a file you create, or if it exists, that you edit, which is read by Firefox when it starts up) or using an extension such as Stylish.


To apply the rule using the Stylish extension, step 1 is to install the Stylish extension: https://addons.mozilla.org/en-US/firefox/addon/stylish/

Next, select and copy the rule from earlier in this post.

To set it up:

(1) Stylish will add an "S" icon either to the main Navigation Toolbar or to the Add-on bar. Click the Stylish "S" icon > Write new style > Blank style.

(2) Click in the large editing area next to the faded "1" and paste in the rule.

(3) Click the Preview button to apply the rule. Success?

(4) Before saving the rule, type a name in the top box, for example: Context Menus White BG

That's it. Unless there's a problem in Step 3.

Modified by jscher2000 - Support Volunteer

more options

Regarding other menus, is it the classic menu bar or the orange Firefox button menu? These have different CSS selectors (the hooks for applying style rules).

more options

Is this in the Firefox user interface?

You can see if you can find a complete (full) theme that has a setting to change this color.


Add code to the userChrome.css file below the default @namespace line.

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

menupopup { background-color: rgb(255,255,255) !important; -moz-appearance: none!important; }

The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.

more options

@jscher2000 Unfortunately your code doesn't work for me but thank you anyway for your time. Moreover I'm so happy to learn about Stylish extension and I will play immediately with it.

@cor-el Thank you so much, you solved my problem, your code is perfect for my needs. Only a question, I ask you if this code will work for a long time or probably it will change in the future. Thank you also from my sister, the visually impaired person that moved me to ask your help.

more options

You're welcome

This is a very generic code that only has a 'menupopup" selector that is very unlikely to get changed as this would involve to change all Firefox theme and CSS files that use this selector...

more options

Perfect, this is a real good news, so I will have this setting for a long time. Thank you so much cor-el, you are a good man!