Snippets/Page Table of contents Top-right

How to use Snippets
List of Snippets
Page Table of contents Top-right
Language(s): CSS
Compatible with: MediaWiki all+ (all)

Description

edit

This small css code moves the page table of contents (TOC) "top-right" instead of (the default) "top-left".

Frequently the page table of contents takes up a large vertical size of the screen while more than half of the (right) screen width remains blank. Page content is needlessly shifted down with subsequent required scrolling. Moving the TOC to top-right makes better use of the available screen space and produces a better visual presentation. Frequently leading sections do not contain too much text, so it perfectly aligns with the TOC.

Visual Example

edit

This page!

Usage

edit

It should work for all types and versions of MediaWiki.

Code

edit

TOC top-right

#toc {
        border:1px solid #aaa;
        background-color: #eed;
        padding: 5px;
        margin: 0px 5px;
        font-size: 95%;
        float: right;
}

Notes

edit

You must be logged in, of course, to see the effect.

Template

edit

Use can use {{tocright}} to simulate.

See also

edit