Changing background-color

Changing background-color

by A B -
Number of replies: 8
Hello,

I have downloaded the theme "czw_blue_new" and wanted to change the background-color. In the file "styles_variable.css" I changed the background-color in line 32:

Original:

body {
background-image: url('images/bg.png');
background-repeat: repeat-x;
background-color:#4FADDC;
min-width: 960px;
margin-left: auto;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
}

Mine:

body {
background-image: url('images/bg.png');
background-repeat: repeat-x;
background-color:#000000;
min-width: 960px;
margin-left: auto;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
}

But nothing happened. When I look at the Page with Firebug, still the old color is shown in the source code. What did I wrong? Do I have to change the color at another place?

I use Moodle 1.9.5+ with Xampp.

Thank you.

Average of ratings: -
In reply to A B

Re: Changing background-color

by jacques roux -
Hi Claudia,

Can you try to take out the background image line and see what happens.

Like so:

body {
background-image: none;
background-repeat: repeat-x;
background-color:#000000;
min-width: 960px;
margin-left: auto;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
}

Regards
Jacques
In reply to jacques roux

Re: Changing background-color

by Frank Ralf -
Hi Claudia,

It does work with my Moodle installation. However, large parts of the header and footer background are provided by background images (see screenshot).

Try clearing your browser cache (or better use the Firefox Web developer extension for temporarily disabling the cache while working on your theme.) And be sure to reload the page so modifications to your CSS will show.

hth
Frank
In reply to Frank Ralf

Re: Changing background-color

by A B -
Thank you for answering.

Where did you change the background-color? I restartet my pc and installed the Web Developer. But still nothing happens. Even, when I delete the whole body-information in ..\moodle\theme\czw_blue\styles_variable.css there are no changes, no errors, nothing. sad
In reply to A B

Re: Changing background-color

by Frank Ralf -
Hi Claudia,

Strange... I did exactly as you described (in styles_variable.css).

Are you changing the original theme or do you work with a (renamed) copy? In that case you might have to change some settings in the theme's config.php file. See Creating a custom theme and Make your own theme for further information.

hth
Frank
In reply to Frank Ralf

Re: Changing background-color

by A B -
I work with a renamed copy.

In the config.php I did not find a line I have to change.

I deleted the original theme to look where the backgroundinformation is found. There has to be an error, hasn't it? But there is no error. I changed the background-color in the css and saved the file. Then I searched for the color-code and nothing was found. But when I tried to look at my moodle it still looks the same and when I look at the code there is the old background-color again. It makes me crazy...
In reply to A B

Re: Changing background-color

by Hartmut Scherer -
Hi Claudia,

Perhaps it may be good to see a screen shot of a page with the wrong color.

I am not sure whether the following advice will do any good to you. Did you change the background color in menubar.css (second line from the top; background color is in the far right).

With kind regards,

Hartmut
In reply to Hartmut Scherer

Re: Changing background-color

by A B -
Thank you very much for your reply and help.

I found out what was going wrong with my moodle.

I had downloaded the package with moodle and xampp for windows. There was no folder called "htdocs". I now installed xampp seperately and then moodle, like seen here: http://docs.moodle.org/en/Windows_installation_using_XAMPP . After this I had "htdocs" and my css-changes are visible! smile


In reply to A B

Re: Changing background-color

by Rochelle Price -
Thank you so much! I was having the same problem, but had no clue that it was due to any installation problems. I re-installed xampp and moodle separately, as you suggested, and it solved my problem, too!