Snippets/Floating Table of Contents

You can add the following to your user styles (or to MediaWiki:Common.css) in order to get the Table of Contents box to show up floating above the content, and fixed on the right hand side of the page.

This has the advantage of allowing the TOC always be present (though still hideable), giving a bird's eye view of the page's content and quick access to its sections from wherever one has scrolled in the page. It also allows users to see the page's contents more quickly if they are beneath a TOC.

There should be enough space between the top and bottom so that the user can still navigate the header or footer links. It also takes into account overflow, adding internal scrollbars to the TOC when the content is too large to fit.

It gives a small degree of translucency so the user can know when there is text or other content behind the TOC, but not too much translucency so as to cause clashing with the TOC text.