Template:Tab: Difference between revisions

From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#switch:{{{1|}}}
<includeonly>{{#switch:{{{1|}}}
|o=<div class="tabber" style="width:{{{2|auto}}}">
|o-left=<div class="tabber goleft" style="width:{{{2|auto}}}">
|o-right=<div class="tabber goright" style="width:{{{2|auto}}}">
|o-right=<div class="tabber goright" style="width:{{{2|auto}}}">
|o-left=<div class="tabber goleft" style="width:{{{2|auto}}}">
|o-center=<div class="tabber" style="width:{{{2|auto}}};margin-left:auto;margin-right:auto">
|o=<div class="tabber" style="width:{{{2|auto}}}">
|c=</div>
|c=</div>
|#default=<div class="tabbertab" title="{{{1|}}}" style="background:{{{2|white}}}">
|#default=<div class="tabbertab" title="{{{1|}}}" style="background:{{{2|white}}}">
Line 8: Line 9:
==Usage==
==Usage==
===Openers===
===Openers===
*'''<code><nowiki>{{tab|o}}</nowiki></code>''' - Used to create a general tab box that doesn't float, or a tab box contained within another tab box (whether it floats or not).
*'''<code><nowiki>{{tab|o-left}}</nowiki></code>''' - Used to create a tab box that floats to the left. If you don't want the page content to go next to the tab box, use the general opener above.
*'''<code><nowiki>{{tab|o-right}}</nowiki></code>''' - Used to create a tab box that floats to the right.
*'''<code><nowiki>{{tab|o-right}}</nowiki></code>''' - Used to create a tab box that floats to the right.
**If the tab box contains an infobox, it's preferred to define the tab box width as an additional parameter, e.g. <code><nowiki>{{tab|o-right|250px}}</nowiki></code>. The infobox will automatically fill the width of the tab box.
**If the tab box contains an infobox, it's preferred to define the tab box width as an additional parameter, e.g. <code><nowiki>{{tab|o-right|250px}}</nowiki></code>. The infobox will automatically fill the width of the tab box.
*'''<code><nowiki>{{tab|o-left}}</nowiki></code>''' - Used to create a tab box that floats to the left. If you don't want the page content to appear to the right of the tab box, use the general opener below.
**Do not use this for wiki content tables, such as a sortable table. Use <code><nowiki>{{tab|o}}</nowiki></code> or <code><nowiki>{{tab|o-center}}</nowiki></code> instead.
*'''<code><nowiki>{{tab|o}}</nowiki></code>''' - Used to create a general tab box that doesn't float, or a tab box contained within another tab box (whether it floats or not).
*'''<code><nowiki>{{tab|o-center}}</nowiki></code>''' - Used to create a tab box centered on the page.
**Use this for wiki content tables, such as a sortable table.


===Tabs===
===Tabs===

Revision as of 20:27, 13 March 2019

Usage

Openers

  • {{tab|o}} - Used to create a general tab box that doesn't float, or a tab box contained within another tab box (whether it floats or not).
  • {{tab|o-left}} - Used to create a tab box that floats to the left. If you don't want the page content to go next to the tab box, use the general opener above.
  • {{tab|o-right}} - Used to create a tab box that floats to the right.
    • If the tab box contains an infobox, it's preferred to define the tab box width as an additional parameter, e.g. {{tab|o-right|250px}}. The infobox will automatically fill the width of the tab box.
    • Do not use this for wiki content tables, such as a sortable table. Use {{tab|o}} or {{tab|o-center}} instead.
  • {{tab|o-center}} - Used to create a tab box centered on the page.

Tabs

  • {{tab|Tab Name}} - Used to start a new tab, with the tab name as the first parameter.
    • The tab's background color can changed with an optional second parameter, e.g. {{tab|Tab Name|grey}}.

Closers

  • {{tab|c}} - Used to close each tab, as well as the entire tab box.

Example

Elder Sign: Core Set

Elder Sign: Unseen Forces

Call of Cthulhu

{{tab|o-right}}
{{tab|Elder Sign}}
{{tab|o}}
{{tab|Core Set}}
Elder Sign: Core Set
{{tab|c}}
{{tab|Unseen Forces|yellow}}
Elder Sign: Unseen Forces
{{tab|c}}
{{tab|c}}
{{tab|c}}
{{tab|Call of Cthulhu}}
Call of Cthulhu
{{tab|c}}
{{tab|c}}