Template:Collapse top: Difference between revisions
Jump to navigation
Jump to search
>TheFrz mNo edit summary |
m (minor background color adjustment, to be a bit more visible.) |
||
(20 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<div | <div class="mw-customtoggle-{{{2|CollapsibleB}}}" style="cursor:pointer; position:relative; width:{{{width|90}}}%; left:8px; background: linear-gradient(#593a22, #392414); display:inline-block; border-radius: 2px; padding:0px 0px; line-height:24px; color:#dcd1ad; font-size:15px; font-weight:bold"><div align="{{{align|center}}}"> {{{1|<noinclude>Extended content</noinclude>}}} <span style="position:absolute;left:5px;">▾</span> | ||
<span style="position:absolute;right:5px;"><span style="font-size:14px;font-weight:400">[Expand]</span> ▾</span></div></div> | |||
<div id="mw-customcollapsible-{{{2|CollapsibleB}}}" class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="display:flow-root;"> | |||
<div class="mw-collapsible-content" style=" position:relative;width:{{{width|88.22}}}%; left:8px; border: 1px solid #342214; padding:{{{padding-content|0 1em}}}; background:{{{bg-content|transparent}}}; text-align:left; box-sizing:content-box;"> | |||
{{{ | <noinclude> | ||
| | |||
Lorem ipsum | Lorem ipsum | ||
{{ | {{collapse bottom}} | ||
{{ | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 08:35, 16 May 2022
Extended content ▾
[Expand] ▾
Lorem ipsum
The {{collapse top}}
template (or {{cot}}
), and its paired template {{collapse bottom}}
(or {{cob}}
), are used for placing a collapse box around a talk page discussion, especially when the content contains complex wikimarkup such as tables. For very simple content, the one-piece template {{collapse}}
can be used instead.
Usage
Place {{collapse top}}
(or {{cot}}
), and {{collapse bottom}}
(or {{cob}}
), around the text to be collapsed. For example:
{{collapse top|This is the title text|OptionalIDToMakeThatEachColapsibleCollapseAndExpandSeparately}} Sample contents text {{collapse bottom}}
produces:
This is the title text ▾
[Expand] ▾
Sample contents text
The above documentation is transcluded from Template:Collapse top/doc.
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.