Can't set userContent.css for Firefox

Tim ignored_mailbox at yahoo.com.au
Wed Sep 22 08:48:54 UTC 2010


On Wed, 2010-09-22 at 08:34 +0100, Colin Paul Adams wrote:
> I have created a userContent.css in
> ~/.mozilla/firefox/<garbage>.default/chrome/userContent.css
>  
> that looks like this:
>  
> body
> {
>     backgroundColor: yellow;
> }
>  
>  
> and restarted firefox (3.5.12 - FC12) but it does nothing.
>  
> What am i doing wrong?

A syntax error, and (once corrected) would only be applied to pages that
don't have any styling rules, already.  If you want to force an
overriding style, you need to add an "!important" clause, before the
semi-colon.

e.g. body {background-color: yellow !important;}

Don't forget to set the foreground colour, as well.

e.g. body {
             color: black;
             background-color: yellow;
          }

You can, in this case, abbreviate background-color down to just
background.  Which would, also, then override any background image that
the site might have.

To see what CSS is about, start here:  http://www.w3.org/TR/CSS2/
CSS2 (probably) being the version with the most support on most
browsers.  CSS3 is still very new, and isn't going to work (as expected)
when people browse a site with an old browser, as many people still do.

-- 
[tim at localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.





More information about the users mailing list