Minecraft Wiki
Advertisement

Template:Doc/start This is a template for creating boxes that start collapsed, but can be expanded by clicking a "show" link on the side.

Usage

The box it creates automatically assigned the class "collapsible collapsed".

Parameters

I would suggest using this when using the template:

{{User:Numbermaniac/Template:CollapseBox
| wholestyle =
| headstyle =
| text =
| contentstyle =
| content=
}}
  • wholestyle allows you to give styling that affects the whole box.
  • headstyle allows you to give style that only affects the header text, that is, the text that appears regardless of whether the box is expanded or not.
  • text is the header text, to which the headstyle applies to.
  • contentstyle allows you to style only the expanded text, that is the text that only appears after you press "show".
  • content is the text that appears after expansion.

Examples

Example 1
{{User:Numbermaniac/Template:CollapseBox
| style= font-size:large; color:#F00
| text = This is the text that will be displayed regardless of whether the box is expanded or not.
| content = This content can only be seen by clicking "show".
}}
Result


Note: If a background color is not given, it may be difficult to realize there is actually a box there.

Example 2
{{User:Numbermaniac/Template:CollapseBox
| style= font-size:large; color:#F00; background-color:#0F0
| text = This is the text that will be displayed regardless of whether the box is expanded or not.
| content = This content can only be seen by clicking "show".
}}
Result


Template:Doc/end

Advertisement