From Wikipedia, the free encyclopedia
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.
This IP address is used for vandalism on Meta |
Welcome to the Wikimedia Meta-Wiki! Please keep test edits in the sandbox. Otherwise, this could be considered vandalism and may lead to you being blocked from editing. |
Edits (deleted) | WHOIS | Global contribs. | Block (log) |
This is a documentation subpage for Template:Collapse top. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used in MediaWiki:Protect-text, and on approximately 51,000 pages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
This template should only be used by uninvolved editors in conjunction with the talk page guidelines and relevant advice at WP:Refactoring. It should not be used by involved parties to end a discussion over the objections of other editors. See WP:SUPERHAT.
Do not hide content in articles. This violates the Wikipedia:Manual of Style § Scrolling lists and collapsible content and Wikipedia:Accessibility guidelines.
Place {{collapse top}} (or {{cot}}), and {{collapse bottom}} (or {{cob}}), around the text to be collapsed. For example:
{{collapse top|title=This is the title text}} Sample contents text {{collapse bottom}}
produces:
This template takes the following parameters, all of which are optional. They are case-sensitive. Those that take CSS measurements require them in CSS format (e.g. 1em
, not 1 em
).
|1=
, |title=
, |reason=
, |header=
, |heading=
, |result=
, or first unnamed parameter{{collapse top|title=This is the title text}}
or {{collapse top|This is the title text}}
. Note: The shorter, unnamed markup will not work if the title value contain an equals (=
) character.|warning=yes
|warning=no
will not work as expected).|2=
or second unnamed parameter|warning=yes
in this case, though doing so is harmless.|left=yes
|left=no
will not work as expected); nor is there a |right=
parameter.|expand=yes
or |collapse=no
|expand=no
and |collapse=yes
will not work as expected).|bg=
#CCFFCC
, a green hue. Named colors are listed at List of colors. For example, {{collapse top|This is the title text|bg=#F0F2F5}}
or {{collapse top|This is the title text|bg=LightGrey}}
(HTML hex color codes require the leading #
).|fc=
|bg=
, above, for details on color options.|border=
1px
. For example, {{collapse top|border=2px}}
; going much thicker than this is not very useful.|b-color=
Silver
(#C0C0C0
). See |bg=
, above, for details on color options.|padding=
0.6em
.|width=
|width=50%
, or in relative em units, e.g. |width=30em
. Pixel-based values should be avoided, as they are effectively meaningless – the result will be different depending on each user's browser and local CSS settings (which browser and operating system it is, zoom level, font sizes, etc.).|border2=
1px Silver
(there is no provision to change from a solid line). For example, {{collapse top|border2=2px}}
(only width or color will be changed if only one value is supplied). See |bg=
, above, for details on color options.|bg2=
White
(#FFFFFF
). See |bg=
, above, for details on color options.|indent=
:
in talk page markup is approximately equivalent to 1.6em
of indent (e.g., to match ::::
indentation level, use |indent=6.4em
. You can also use a percentage value. Pixel-based values should be avoided (see |width=
, above, for why).|clear=
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 |clear=none
, |clear=right
, or |clear=left
, as needed.Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.