Template:Collapse top/doc: Difference between revisions

→‎Parameters: documenting |clear= parameter
w:en>Salvidrim!
(Reverted to revision 710490570 by Giraffedata (talk): Restore doc (simply to follow along the revert to the actual template). ·)
w:en>SMcCandlish
(→‎Parameters: documenting |clear= parameter)
Line 39: Line 39:
;bg2: Sets background of the box that appears when template is expanded; defaults to white. For example, <code><nowiki>{{collapse top|This is the title text|bg2=#F0F2F5}}</nowiki></code>
;bg2: Sets background of the box that appears when template is expanded; defaults to white. For example, <code><nowiki>{{collapse top|This is the title text|bg2=#F0F2F5}}</nowiki></code>
;indent: indents the box from the left of the page. Use: {{para|indent|50px}} not {{para|Indent|50px}} (upper case "I" doesn't work). Defaults to "do not indent" (i.e. 0px). Each ":" in wiki-markup is approximately equivalent to 25px indent.
;indent: indents the box from the left of the page. Use: {{para|indent|50px}} not {{para|Indent|50px}} (upper case "I" doesn't work). Defaults to "do not indent" (i.e. 0px). Each ":" in wiki-markup is approximately equivalent to 25px indent.
 
;clear: In some situations you may not want the default <code>clear: both;</code> CSS to apply, with puts the collapse box below any left- or right-floated content within the same HTML block. In this case, you can use {{para|clear|none}}, {{para|clear|right}}, or {{para|clear|left}}, as needed.
If an entire section is being closed, remove the section header and add it as the first parameter of the template. This keeps the section header from showing in the TOC. For example, <code><nowiki>{{collapse top|Section header}}</nowiki></code>


== Examples ==
== Examples ==
Anonymous user