Importing css
79,596pages on
this wiki
this wiki
Forum page
This Forum has been archived
Visit the new ForumsForums: Index → Support Requests → Importing css
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 304 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( 'http://religion.wikia.com/index.php?title=User:Granpa/wikia.css&action=raw&ctype=text/javascript' );
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( 'http://religion.wikia.com/index.php?title=User:Granpa/wikia.css&action=raw&ctype=text/css' ); OR // 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... */ td, th, html, article, span, div /* << missing comma */ li, pre, dd, a /* further down... */ ******************************************************************************** old versions commented out ******************************* /* ^ That's not a proper CSS comment */
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
- http://religion.wikia.com/wiki/User:Granpa2/wikia.css
- 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.
- http://religion.wikia.com/wiki/MediaWiki:Wikia.js?oldid=190668
- 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 // http://religion.wikia.com/index.php?title=User:Granpa/wikia.css // 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 */ /* http://religion.wikia.com/index.php?title=User:Granpa/wikia.css */ /* NOTE: This is CSS, so it has to go on a .css page */ @import url("http://religion.wikia.com/index.php?title=User:Granpa/wikia.css&action=raw&ctype=text/css");