Keep the MediaWiki sidebar in a fixed position

From The IT Community
Jump to: navigation, search

If your MediaWiki articles get too long to fit on one screen, the user reading them will have to scroll down. And the sidebar will scroll with the page. Typically the navigation and other important stuff is on the sidebar and you want the user to be able to see it all the time.

The best solution is to keep the sidebar in a fixed position even if your article gets scrolled down.

Here is how:

  • Open your wiki and log in as admin or administrator.

  • Now that you edit your Common.css, insert div#mw-panel {position: fixed}.

  • Click Save page.

  • You might have to clear your browsers cache.

  • Done, your sidebar won´t scroll with the rest of the page.

Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.

Translate this page:

Articles found in the same category:
(max. 20 shown)