Thread:Pandaman018/@comment-5107036-20140806015929/@comment-5107036-20140807033701

Of course! I am not an expert on HTML by any stretch of the imagination, but I do know that on our Wiki's style sheet (CSS page), you can set pre-defined styles to a class, which you can define. Here is a link to how CSS can interact with classes and ids:

W3C CSS Selectors

All of the Wiki's CSS is at this page:

Special:CSS

As an admin, you should be able to edit that page, but if you can't, you can actually put css on MediaWiki:Common.css and that css will also get loaded. I personally prefer Special:CSS because it has a built-in debugger.

You cannot "upload" JavaScript files, but you can manually enter them (The following method will also work with CSS):


 * 1) In order to put individual JavaScript or CSS files onto the Wiki, simply type "MediaWiki:" and then the name that you want for the JavaScript or CSS file(Make sure the name ends with the correct extension: either .js for JavaScript or .css for CSS).


 * 1) Once you're done typing, hit Enter and you'll be brought to a blank page telling you that the file doesn't exist, but that you can create it if you'd like.


 * 1) Create the page, and then open the JavaScript or CSS file that you wanted to upload to the Wiki. Copy the contents of the file, and paste it into the editor of the Wiki page.  Once you've done this, save the file.

That is how you upload a JavaScript or CSS file to the Wiki.

If you want the files (Either JavaScript or CSS) to load when the website loads, (So if you want your classes to come into effect as soon as the user enters the site), you'll have to link it in something that loads with the page. The default JavaScript file that loads with the Wiki is MediaWiki:Common.js, and likewise the default CSS file that loads with the Wiki is MediaWiki:Common.css, although again, I personally prefer Special:CSS. There are ways of importing a JavaScript file and a CSS file into these two pages, but I can't remember of the top of my head. Most of the custom JS that I've used I've simply put directly into MediaWiki:Common.js. Custom css sheets can be loaded by including:

@import url("/load.php?debug=false&lang=en&mode=articles&articles=MediaWiki:.css");

at the top of the css sheet.

I hope I answered all of your questions! If you are still unsure, don't be afraid to ask me and I'll try my best to answer you, although what I just said is basically the extent of my knowledge on the matter.