What can be wrong?
I made a test-rule, like the youtube movie. I added body { background:red;} and applied it for . Just some simple code to test.
But nothing happens ...
What can be wrong?
I made a test-rule, like the youtube movie. I added body { background:red;} and applied it for . Just some simple code to test.
But nothing happens ...
Comments
Comment #1
MatthijsG commenteda, dr.org is cleaning my code :-)
I applied the CSS to the frontpage. The CSS is working, i tried it with the web-dev bar from Fx.
Does CSS injector needs some special settings? Special theme's?
Comment #2
mrtoner commentedAs with blocks, you can use the Add the CSS on specific pages setting to inject the CSS on specific pages. What happens when you select Add on every page except the listed pages?
Comment #3
AKN_39 commentedThis looks like a really useful tool, but I can't get it to work either. I have the appropriate permission set and I tried several combinations, including using the CSS !important flag, with no success. Any suggestions would be appreciated.
Thanks. . .
Tony N.
Comment #4
mrtoner commentedAs with #1, without more information it's impossible to offer help. CSS Injector works just fine, so I assume your rule (Add the CSS on specific pages) is not set properly.
Comment #5
AKN_39 commentedHi Mrtoner: Thanks for getting back to me. Yes, I believe you when you say that CSS Injector works fine. I'm new to Drupal and I'm keen to use it, as one of the things that I am having difficulty with is figuring out where (which modules) to apply styling changes, so CSS Injector seems like a great way to accomplish this. As an example, here is what I tried:
- If I change the following code in the Theme's (Painted Wall) style.css file:
#logo{
float:left;
}
to
#logo{
float:right;
}
. . . the change is applied i.e. the logo will display on the right.
- If I add the code:
#logo{
float:right;
}
in a CSS Injector rule, it has no effect (after clearing the cache and reloading).
I have Add on every page except the listed pages checked, and no pages listed in the Pages section. I have Media: All selected and Preprocess CSS checked.
Am I using CSS Injector as intended and should this example work?
Regards. . .
Tony N.
Comment #6
mrtoner commentedI know you said above, "...I tried several combinations, including using the CSS !important flag...", but the code above doesn't reflect that.You will need to use that to override anything in the theme's stylesheets, since the theme's stylesheets are loaded last. You might uncheck Preprocess CSS to see if that makes a difference.
Comment #7
AKN_39 commentedMrtoner: Thanks again for your response. I tried both the !important flag and unchecking Preprocess CSS, but I still don't see any results.
I still have faith in your module and I am going to try a fresh install of Drupal in case I have corrupted something through other testing.
Regards. . .
Tony N.
Comment #8
MatthijsG commented@ #4 - I posted the issue in 2008 and de-installed the module because i didn't get it working
Comment #9
mrtoner commented@AKN_39: When you view the page source, do you see a "...files/css_injector_1.css" stylesheet included among the others?
@Lenn-art: Thanks for the update. I was cleaning up some of the issue queue and noted there wasn't enough information in your post to help.
Comment #10
MatthijsG commentedTwo years ago i was a newbie and i didn't know.
Now i'm still a newbie but i know i'm a newbie ;-)
Comment #11
AKN_39 commentedMrtoner: Yes, the css_injector stylesheet is included in the list of stylesheet files.
As I mentioned, I am new at this, so this may be a "rookie" error; however, I think I know what's going on. After creating the rule, I looked at the file both in the CSS Injector edit view and Notepad and I see that the HTML paragraph tags have been added to the code, even when using Plain text editor to create the rule. When I edit the file in Notepad and remove the
<p>and</p>tags, the CSS Injector code works.Does this sound right?
Thanks for your help. . .
Tony N
Update: OK, now I understand the meaning of the The ID for excluding or including etc. and with clarification from http://drupal.org/node/541654 it looks like a false alarm. Thanks for your patience and help. . .
Comment #12
mrtoner commentedAh, yes, a WYSIWYG editor will screw up CSS, PHP code, etc. Be sure to set up an input format that doesn't apply any filters, just for use in situations like this.
Comment #13
POVYLAZZZ commentedNot working and the WYSIWYG editor is down...
Comment #14
mrtoner commented@POVYLAZZZ: And your post doesn't give any more information that I can use to help you. Sorry.
Comment #15
klonos...this is a support request.
Comment #16
forestmars commentedJust a note since I am seeing a lot of people saying it doesn't *work* –ie it doesn't override any other defined element styles. This doesn't really have to do with whether your css is being preprocessed, but is a result of css_injector sheets being loaded *first* not last.
If you just take a look at your view source, it should be quite obvious. This also has the added benefit of giving you an answer a lot faster than filing an issue in the queue, since it viewing source takes really just a few seconds, whereas waiting for someone to respond to a support request tends to take somewhat,,,,, longer.
~ Forest Mars
Comment #17
rfayComment #19
sierea commentedyou need to clear your cash every time you make a change, make sure nothing is cached.
admin/config/devel/performance.
save changes->clear cache-> refresh page