tags:

views:

221

answers:

2

I'm writing an external user stylesheet for an old HTML page that specifies the background colour in the body tag: <BODY BGCOLOR="#808000"> (note: I can't edit the HTML).

I've tried writing the obvious stylesheet:

body {
  background-color: #ffffff !important;
}

but it has no effect: the original colour remains.

Can it be done with CSS? If so, how?

A: 

FIX: I've checked it in my place it works

body
{
    background-color: white;
}

You can also do

<body style="background-color:red"></body>
Artem Barger
+1  A: 

It works fine here (I tested it). Are you sure the stylesheet is being imported properly?

Aistina
Yes. That was the problem. I'm an idiot :)
david-ocallaghan
@David: To be fair to the community can you be more specific, what exactly was the problem?
AnthonyWJones
I was trying to apply the user stylesheet using the [Stylish](https://addons.mozilla.org/firefox/addon/2108) Firefox extension. And the extension was disabled...
david-ocallaghan