Hi all.
I'm new in fusion: I have started with it some weeks ago, but I find it very useful and powerful.
I would like to customize my web site in specific pages using cssInjector.
Specifically I would like to change the left-sidebar background depending on the active page: I have already specify a default background for sidebar in local.css file of my sub-theme, but now for some specific pages, I would like to change it on-line.
For this reason I tried to use ccsinjector module, but it seems that my css order are every-time overwritten by fusion theme.
any suggestions?
BR
Roberto
Comments
Comment #1
aquariumtap commentedHi Roberto,
Could you send me the CSS you are trying to inject? Fusion should be compatible with the css_injector module.
Comment #2
rob.gianfelice@gmail.com commentedHi.
Below the css I'm trying to inject.
This is only a test: try to change the background on the sidebar.
I added the !important value to force the overriding, but it doesn't work.
Css_injector 6.x.1.4
fusion: 6.x.1.1
I have configured a sub-theme of fusion.
BR
roberto
=================
.sidebar-first { background: none repeat scroll 0 0 aquamarine !important; }
=================
In the "pages section inside the CSSInjector module, I have specified the node to work on.
Comment #3
aquariumtap commentedHi Roberto,
That CSS worked for me. I see the sidebar-first region with an aquamarine background.
Are you seeing any CSS from the css_injector module? Have you tried applying the CSS to all pages, instead of one particular node?
Attached is a screenshot of my browser running Fusion 6.
Comment #4
rob.gianfelice@gmail.com commentedHi.
Really strange.
I tried another time on my site, but it doesn't work.
I fixed the rule to be applied on all pages, but nothing.
Do I have to activate flags or other?
Do I have to modify something inside the .info file?
I'm also using Skinr module: do you feel any compatibility problems?
I Use the Preprocess CSS flag.
thanks for your help
Roberto
Comment #5
aquariumtap commentedYou don't have to activate any flags or modify anything in the .info file, and there's no incompatibility with Skinr. Is the CSS file loading?
I don't think I can be of much additional help, because I'm not that familiar with the details of css_injector. Their issue queue would be more helpful at this point.
Best of luck!
Comment #6
rob.gianfelice@gmail.com commentedHi.
I have checked the code of my pages and I find a strange behaviour.
It seems that the file is included, but with a wrong character at the end:
could be the "?y" added at the end be the problem?
Many thanks for you support
BR
Roberto
Comment #7
aquariumtap commentedHi Roberto, that's normal. It's a mechanism to flush out the cache.
Comment #8
sheena_d commentedHi Roberto,
The CSS you are using is not a valid format. If you go to http://jigsaw.w3.org/css-validator/#validate_by_input and input your CSS code, you will see that an error is thrown. Some browsers will recover gracefully from this error and be able to figure out what you meant with your invalid CSS, but other browsers will not. This would explain the difference between what you and aquariumtap are seeing if you are both using different browsers. Also, "aquamarine" is not a W3C valid color name.
Instead, try using this CSS code:
You should not need the !important designation.
Cheers,
Sheena
Comment #9
rob.gianfelice@gmail.com commentedHi All.
Finally I got the result ;-)
The problem was neither in fusion or css_injector, but simply on my .htaccess into sites/default/files.
It was configured to avoid the access to files into sites/default/files and so the css contribution was inaccessible.
Now I fixed it and I got my sidebar.
Thanks so much to all.
BR
Roberto
Comment #10
aquariumtap commentedThank you for telling us how the problem is fixed! Take care