Body background property not working

I have a base css file under which I add different css files to change the color schemes. But, I can get the
body {
background: #000000;
}
to work. Any ideas? http://rereport.com/sf/test2.

TIA

Rick

The CSS file I’m seeing says

color: #000000;
background-color: #ffffff;

Browsers read the first CSS file they find, and unless something in a later stylesheet has a higher specificity, it won’t override anything from the first stylesheet. To get your c21.css to override styles.css for certain pages only, you would need to do something along the lines of

<body class="c21">

in the document, and then

body.c21 {background-color:#000;}

in the c21.css file. This will ensure that it overrides the background set in styles.css

Steve:

Thanks for the reply. Unfortunately, it obviates what I’m trying to do which is to have a master css and then multiple css files to change the color scheme.

Guess I’ll just have to right multiple master css files.

Rick

The problem is caused by the body style in c21.css. You have written it as C21 body. When I changed the C21 body to body the site background changed to black as you wanted.

Allan:

thank you!!!

That was a typo. The c21 should have been in the comments. Made your change and presto!!!

Many thanks!

rick

feel like an idiot!

Instead of multiple master CSS files. You can do one and link it in everypage. Then If a page needs a different styling you can use in-page styling in the styling tags to overwrite the master CSS styling.
<link href=“css/master.css” type=“text/css” />
/* let us say the master.css file has the styling background:#fff for the body. & this html file needs to have a black background and white font colour. /
/
so then add this in the html */
<style>
body{
background:#000;
color:#fff;
}
</style>

Hope that helps