Template:Collapse

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
Revision as of 23:23, 5 August 2020 by Bentre Sadow (talk | contribs)
This high-risk template has been protected from editing to prevent vandalism.

Please discuss changes on the talk page. You may use editprotected on the talk page to ask for an administrator to make an edit for you.

Extended content
{{{1}}}


Usage

bg parameter

The bg parameter is optional parameter that allows the user to change the background color. optional. It changes the background color. Use Web color values (e.g. #F0F2F5).

Example

{{Collapse|1=Discussion text to be put into box.|bg=#F0F2F5}} creates:


Extended content
Discussion text to be put into box.


The padding parameter

The padding parameter adjusts the amount of cell padding (defaults to 8px):

{{Collapse|1=Discussion text to be put into box.|padding=20px}} creates the following (expand the box to see the border padding effect):


Extended content
Discussion text to be put into box.


The float parameter

The float parameter allows the collapsed content to float to the left, right, or center of the page (defaults to none with width = 100%):

{{Collapse|1=Discussion text to be put into box.|float=center}} creates the following:


Extended content
Discussion text to be put into box.


{{Collapse|1=Discussion text to be put into box.|float=center|width=30em}} creates the following:


Extended content
Discussion text to be put into box.


{{Collapse|1=Discussion text to be put into box.|float=left|width=30em}} creates the following:


Extended content
Discussion text to be put into box.


{{Collapse|1=Discussion text to be put into box.|float=right|width=30em}} creates the following:


Extended content
Discussion text to be put into box.


{{Collapse|1=Discussion text to be put into box.|float=none|width=30em}} creates the following:


Extended content
Discussion text to be put into box.


The expand parameter

Simply add Template:Para to have the box show up in expanded form with a "hide" link, instead of collapsed form with a "show" link. Other options: Template:Para yes, y, expand, expanded, uncollapse, uncollapsed. Note: Template:Para will fold the box (default).

The clear parameter

In some situations you may not want the default clear: both; CSS to apply, which puts the collapse box below any left- or right-floated content within the same HTML block. In this case, you can use Template:Para, Template:Para, or Template:Para, as needed.

When content includes tables

This template frequently breaks when used around content that consists of or includes wikitables. Such content can be made collapsible by using the Template:Tlx and Template:Tlx templates instead of Template:Tlx.

If you want to collapse only the table and not other content, you can do this using wikitable parameters. See the Collapsing tables guide for help.