Floating menu in Mediawiki 1.7

Submitted by Frederic Marand on
Just a quick note about Mediawiki today, because I noticed I hadn't been writing about software for quite some time. I just installed Mediawiki 1.7 on a server, and was annoyed by its table of contents (TOC) being in the normal HTML flow under the default "Monobook" skin, unlike Dokuwiki, for which the default skin neatly places the TOC on the top right of the main area. Of course, you can always use per-page directives to define this, like {{TOCright}}, but this is tedious to do on every page. After considering alternative skins, I figured it might not be that much to tweak, and indeed it is quite simple once you know where rules are located. so here we go:
  1. find the root of your mediawiki install, which we'll call <root>
  2. cd <root>/skins/monobook
  3. edit main.css
  4. find the rule for #toc, .toc
  5. add a float: right; margin: 0 0 1em 1em; to it.
  6. That's it !