How to make basic changes to mediawiki skins

In this article we’ll show you the basics on how you can get started with editing skins in mediawiki.

To edit the look and feel of the your mediawiki, you’ll need to edit the css file of the current skin you’re using. In this example, we’ll edit the monobook theme, which is the default theme. The CSS file can be updated by going to the MediaWiki:Common.css CCS location in MediaWiki. You can visit it by go to the similar url below.

https://your-mediawiki.com/index.php?title=MediaWiki:Common.css

How do I change the width of the entire page and center it?

The default page width takes up 100% of the screen, and does so because of the following code in the MediaWiki:Common.css file:
#globalWrapper {
font-size: 127%;
width: 100%;
margin: 0; padding: 0;}
If you want the content of the page to take up 900px and be centered on the screen, make the following adjustments:
#globalWrapper {
position:relative;
font-size: 127%;
width: 900px;
margin-left:auto;
margin-right:auto;
padding: 0;
}

Was this article helpful? Join the conversation!