Fandom

Wikia Developers Wiki

CodeBoxes

896pages on
this wiki
Add New Page
Talk1 Share

CodeBoxes allows you to change the layout of the boxes which you can use to show the raw codes. You can use this code on one page or for the whole wiki.

It's always possible to add this code to a template page and add the code you want to show also on that page in the code. It's not possible to add this code to a template page and use it on normal pages and adding the codes into the template code you use on the normal page.

Usage

One Page

Add on a template page the following code, for example on the page "Template:Code" like this code:

<pre style="border: 1px solid #010256; padding: 2px;
border-radius: 5px; box-shadow: 1.5px 1.5px 5px black;
margin: 0 5px 0 5px;" lang="css">
Code here
</pre>

You only have to copy this code and replace "Code here" with the code you want to show. It'll look like this:

<pre style="border: 1px solid #010256; padding: 2px;
border-radius: 5px; box-shadow: 1.5px 1.5px 5px black;
margin: auto; width: 750px;" lang="css">
Code here

Wiki-Wide

If you want to have this layout of the code boxes on your whole wiki add the following code to MediaWiki:Wikia.css on your wiki.

/* Code Boxes Layout (made by 2Actimv) */
.WikiaArticle pre {
    border: 1px solid #010256;
    padding: 2px;
    border-radius: 5px;
    box-shadow: 1.5px 1.5px 5px black;
    margin: 0 5px 0 5px;
}

Now you only have to use this code to use it on your wiki:
<pre>code here</pre>

Customizing

You can customize the code further by adding extra codes in the code.

Known Bugs

If you find bugs please let me know on my talk page or use the talk page of the article.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.