Template:Tocright: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div style="float:right; clear:{{{clear|right}}}; margin-bottom:.5em; padding:.5em 0 .8em 1.4em; background:transparent; max-width:20em;">__TOC__</div><noinclude>
Causes the page Table of Contents, TOC, to be positioned to the right on wiki pages. Use this at, or near, the top of a page to position the TOC to the right. See also <nowiki>{{toc}}</nowiki>.
{{documentation}}</noinclude>
 
;Usage
* clear - ''Optional'' CSS 'clear' setting for the outer float container. Default is 'right'.
* width - ''Optional'' outer box width (especially good for crazy long section names). Default is 'inherit'.
 
;Examples
<nowiki>{{tocright}}</nowiki> - floats TOC to right side and clears right
 
<nowiki>{{tocright|width=30%}}</nowiki> - floats TOC to right side, clears right, and restricts TOC max-width to 30% of content width
 
 
[[Category:General wiki templates|{{PAGENAME}}]]
----
 
;Template
<onlyinclude><!--
 
--><div style="float:right;clear:{{{clear|right}}};margin:.5em 0 1em 1em;width:{{{max-width|inherit}}};">__TOC__</div><!--
 
--></onlyinclude>

Latest revision as of 02:10, 16 December 2020

Causes the page Table of Contents, TOC, to be positioned to the right on wiki pages. Use this at, or near, the top of a page to position the TOC to the right. See also {{toc}}.

Usage
  • clear - Optional CSS 'clear' setting for the outer float container. Default is 'right'.
  • width - Optional outer box width (especially good for crazy long section names). Default is 'inherit'.
Examples

{{tocright}} - floats TOC to right side and clears right

{{tocright|width=30%}} - floats TOC to right side, clears right, and restricts TOC max-width to 30% of content width


Template