Background picture cannot be fixed

Best WordPress theme for game news websites, game portals or whatever your preferred subject.
GK User
Fri Sep 21, 2012 7:07 pm
Hello,

Even if I insert in line 29 of the template css "fixed", the background picture scrolls. Something must override this parameter.

Code: Select all
background: #f4f4f4 url('../images/bg1.jpg') no-repeat fixed center 0


What else do I need to modify?

Thanks
User avatar
Senior Boarder

GK User
Fri Sep 21, 2012 9:41 pm
Hi,

Did you tried to use the !important at the end of the property value?
User avatar
Administrator

GK User
Sat Sep 22, 2012 7:35 am
dziudek wrote:Hi,

Did you tried to use the !important at the end of the property value?


Sorr, I don't catch what you mean. :unsure:
User avatar
Senior Boarder

teitbite
Sat Sep 22, 2012 7:59 am
Hi

I think that Dziudek was talking about adding !important rule at the end of this code. Like this:

Code: Select all
background: #f4f4f4 url('../images/bg1.jpg') no-repeat fixed center 0 !important;
User avatar
Moderator

GK User
Sat Sep 22, 2012 8:46 am
Ohhh, I see! It does work now. Thank you for the clarification!

Does "!important" tell other files not to override this setting?
User avatar
Senior Boarder

GK User
Sat Sep 22, 2012 7:40 pm
The code won't be overrided by other css rules if there is no more !important ;) so even !important can be overrided but it is harder than for the non-!important rules.
User avatar
Administrator


cron