Jump to content

[SOLVED] how to colour/background changes


Recommended Posts

Completely trashed the css file I was working on so had to roll back and no cant get the background image to show and the colours to change

 

Can anyone see whats wrong with this code?

/* *************************************************************************
	generic style
************************************************************************/
body{
    font:normal 11px/14px Arial, Verdana, sans-serif;
	color:#222;
    background:url(../img/grass.jpg) repeat;   <-- url has been checked
	background:#383838;
}
body.content_only {
	background: #FFF;
}

All looks ok to me and its doing my head in that something so basic is defeating me!

Link to comment
Share on other sites

is your website online? if so, can you please share url?

problem is probably related to fact, that you use two instances of background param:

    background:url(../img/grass.jpg) repeat;   <-- url has been checked
	background:#383838;

instead of this use just one

background: #383838 url(../img/grass.jpg) repeat;
Link to comment
Share on other sites

 

will work if you add !important modifier

background: #383838 url(../img/grass.jpg) repeat!important;

it's because you've got there, in style.css line 1 this:

body {
background: #fff;
font-family: Arial, sans-serif;
}

 

Thanks but not sure I understand - where is style.css? 

Cant see that code anywhere

Link to comment
Share on other sites

Great that worked - thanks!

Didnt have to do that before so not sure why I needed to this time....

 

Never mind it worked!

You had to this time because <body> style is normally set in theme's global.css and it shouldn't be in some module's style.css. Keep it clean and you won't have to use !important at all.

Edited by Sharak (see edit history)
Link to comment
Share on other sites

You had to this time because <body> style is normally set in theme's global.css and it shouldn't be in some module's style.css. Keep it clean and you wan't have to use !important at all.

Actually youve hit the nail right on the head!!

Forgotten I had installed the module that includes the style.css and didnt realise it was overriding global.css

 

Presumably as I have now uninstalled that module I can delete the module files and global.css will then be good to go again?

Link to comment
Share on other sites

If you uninstalled this module then it shouldn't load any .css files so you don't have to delete anything. Style for body section should be loaded from global.css now. You can delete the module if you don't need it anymore. It would be also good idea to clear cache in admin Advanced settings -> Performance

Edited by Sharak (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...