This Forum has been archived

Visit the new Forums
Forums: Index Support Requests Importing css
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 1912 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

I just realized that the following line is incorrect

importScriptURI( '' );

Even though the given url does indeed open to the right page it doesnt work presumably because type=text/javascript is incorrect.

what type should I use to make this work correctly?

I already tried the obvious.

Granpa (talk) 23:19, July 24, 2012 (UTC)

Here's a couple different imports you could use (these are JavaScript):

// strict, fails on syntax errors
importScriptURI( '' );
// lenient, doesn't care about syntax errors as much
importStylesheetPage('User:Granpa/wikia.css', 'religion');

Warning: The stylesheet you are trying to use has a number of syntax errors, of which the following may only be a few:

@media print {     /* << unclosed */
/* further down... */
div                /* << missing comma */
/* further down... */
******************************************************************************** old versions commented out *******************************
/* ^ That's not a proper CSS comment */

20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 23:31 UTC, Tue, 24 July 2012

Thank you. I have a second account and I am trying to import it into this page
I have tried both and neither works.
Now that I think about it, we were importing navigation popups into our sitewide javascript page using a very similar line and it stopped working many months ago.
Granpa2 (talk) 00:15, July 25, 2012 (UTC)

our javascript page is empty now but here is what it looked like before it mysteriously stopped working.
Granpa (talk) 00:19, July 25, 2012 (UTC)
I wouldn't know anything about why your navigation pop ups don't work. It appears to be a script from Wikipedia, and there's no guarantee that scripts from Wikipedia will work (or continue to work) here on Wikia, as both sites are quite different.
w:c:religion:User:Granpa2/wikia.css <-- You can't put JavaScript in a CSS page like that! The import statements I gave you above were JavaScript.
// One way to import
// NOTE: This is JavaScript, so it has to go on a .js page
// (This is the same as the example I gave above)
importStylesheetPage('User:Granpa/wikia.css', 'religion');

/* Another way to import */
/* */
/* NOTE: This is CSS, so it has to go on a .css page */
@import url("");
20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 00:34 UTC, Wed, 25 July 2012
Its working great. :-) Granpa2 (talk) 01:01, July 25, 2012 (UTC)