PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 16, 2022

[FIXED] How to set the background color of Firefox' URL bar with userChrome.css?

 October 16, 2022     css, firefox, userchrome.css     No comments   

Issue

I'm trying to change the background color of my Firefox URL bar using userChrome.css. Following these steps, I added the code below to my userChrome.css (inside <profile>/chrome):

@-moz-document url(chrome://browser/content/browser.xul),
               url(chrome://browser/content/browser.xhtml) {
    #urlbar {
        background-color: red !important;
    }
}

It didn't work at all. How could I get to do it?


Solution

First, you need to set toolkit.legacyUserProfileCustomizations.stylesheets preference to true in about:config, as described here.

Now, the right CSS identifier to be used is #urlbar-background:

@-moz-document url(chrome://browser/content/browser.xul),
               url(chrome://browser/content/browser.xhtml) {
    #urlbar-background{
        background-color: red !important;
    }
}

(I learned that from this file; the whole repository is quite instructive.)



Answered By - brandizzi
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing