Topic on Project:Support desk

In Correct (talkcontribs)

I am new to MediaWiki and this is what I want to do:

I want to make it red.

This is my MediaWiki:

http://wiki.boingblogs.com/

This is an example of what I want it to look like:

http://forums.boingblogs.com/

I found the Help:Skins page but the Discussion page said to post my question here. ALL I WANT TO DO IS MAKE IT RED!

MediaWiki 1.20.0 PHP 5.3.15 (cgi-fcgi) MySQL 5.5.23-55

88.130.68.23 (talkcontribs)

Hi!

That is easy. :-) Your wiki has a page called MediaWiki:Common.css. You can insert CSS styles on that page. They will then be valid for all skins (also for the skin called Monobook, which you are using).

Your red parts of the page use an image, images/catbg.jpg. Copy that image into your MediaWiki installation, for example in the folder skins/common/images. Then you can use it in MediaWiki:Common.css by adding these CSS styles:

h2 {
  background: url("skins/common/images/catbg.jpg") repeat-x scroll 0 0 #990000;
}

This will give headlines of level two the red background image.

With that kind of definitions you can style elements as you want. (Btw. you can do much more with CSS; basically you can use it to change the complete design of your wiki. Just try it! ;-) )

In Correct (talkcontribs)

I found the image "catbg.jpg" and have copied it into "skins/common/images"

I could not find a "common.css" but in "skins/common" I found these files:

"commonContent.css" "commonElements.css" "commonInterface.css" "commonPrint.css"

also in the same directory I found:

"config-cc.css" "config.css"

Which of these pages should I paste:

"h2 {

 background: url("skins/common/images/catbg.jpg") repeat-x scroll 0 0 #990000;

}"

In Correct (talkcontribs)

and what about "shared.css" ?

MarkAHershberger (talkcontribs)

There is a page on your wiki called "MediaWiki:Common.css". That is where you put the code.

88.130.115.230 (talkcontribs)

Yes, you should put this on that page in your wiki.

You could also modify one of the files, which you found there, but that is not recommended: First you cannot just change these files, but you need file system access while you can edit the CSS on that page like any other wiki page. And your changes in one of these files would be overwritten when you next update MediaWiki. So better use the wiki page.

In Correct (talkcontribs)

I found it.

I tried to search in MediaWiki, just like if I was doing a search for an article.

Earlier, I was searching in cPanel for a file named "Common.css" and I even searched for "MediaWiki:Common.css" which I could not find either.

Okay. So that part is red now. How do I make the corresponding text white?

88.130.115.230 (talkcontribs)

What you now want to do is not special for MediaWiki, you just want to know how to use CSS. I think you will find good tutorials, when you just feed Google.

CSS offers settings for margins, for paddings, for background-color, for (text) color, for font-size, font-family, and many, many, many more. You can basically change the complete styling of your site with it - and with complete I actually mean "every aspect".

E.g. you can get white text for these headlines like so:

h2 {
  background: url("skins/common/images/catbg.jpg") repeat-x scroll 0 0 #990000;
  color: white;
}

You should try out Firebug, an extension for Firefox. It allows you to modify CSS styles of a page while you view it in the browser. That way you can quickly get the results you want. Then copy your changes in Commons.css and you have it. :-)

In Correct (talkcontribs)

I still need to edit the sidebar! I would like to add similar white text on red background for the words. "navigation", "search", "toolbox", etc. ... and I would like to make the entire sidebar wider.

Do I do this with "MediaWiki:common.css", or do I have to use "MediaWiki:Sidebar"?

Will the customizations made by using "MediaWiki:Sidebar" be applied to ALL skins, or just Monobook?

MarkAHershberger (talkcontribs)

If you want to do this for every skin, it is better to keep the changes in MediaWiki:Common.css -- I don't think this could even be done in MediaWiki:Sidebar.

Reply to "Change The Color"