---
title: "Changing the CSS in MediaWiki"
description: "MediaWiki has a unique way of making style sheet changes. There is a MediaWiki:Common.css page built into the program that stores global CSS changes. Instead of editing the .css files directly on the..."
url: https://www.inmotionhosting.com/support/edu/mediawiki/changing-css-media-wiki/
date: 2013-02-25
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["MediaWiki"]
type: post
lang: en
---

# Changing the CSS in MediaWiki

MediaWiki has a unique way of making style sheet changes. There is a MediaWiki:Common.css page built into the program that stores global CSS changes. Instead of editing the .css files directly on the server, you can edit the MediaWiki:Common.css file through your MediaWiki admin. Below are the steps to add custom CSS code to your MediaWiki site.

## How to change the CSS in MediaWiki

1. [Log into MediaWiki](/support/edu/mediawiki/login-username-password/).
2. [![Go to the MediaWili:Common.php url MediaWiki](https://www.inmotionhosting.com/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-1-url.gif)](/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-1-url.gif) Visit the following url. Make sure you change your-mediawiki.com to your domain name. https://your-mediawiki.com/index.php?title=MediaWiki:Common.css [![The CSS page should load MediaWiki](https://www.inmotionhosting.com/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-2-css-page.gif)](/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-2-css-page.gif) You should see the page say, “*/* CSS placed here will be applied to all skins */*“. If you do not see this, then you are on the wrong page. Make sure you typed it correctly.
3. [![Click Edit MediaWiki](https://www.inmotionhosting.com/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-3-edit-page.gif)](/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-3-edit-page.gif) Click **Edit** towards the top left of the page..
4. [![Add the CSS cdoe MediaWiki](https://www.inmotionhosting.com/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-4-add-css-code.gif)](/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-4-add-css-code.gif) On the “*Editing MediaWiki:Common.css*“, add the code you want to change the style for. In this example, we will change the font of the entire site to “*Courier New*“. Click **Save Page**. [![View of CSS change MediaWiki](https://www.inmotionhosting.com/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-5-changed-font.gif)](/support/wp-content/uploads/2013/02/edu_mediawiki_103_edit-css-common_edit-css-common-5-changed-font.gif) The CSS change will apply globally to the MediaWiki site. The image to the right shows the font change to “*Courier New*“.
