Template:Box: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
no edit summary
(added undocumented style hook)
No edit summary
Line 24: Line 24:
}}<!--
}}<!--


--><div class="{{#var:type}}box" style="{{#var:align}} width:{{{width|auto}}}; {{{style|}}}">{{#if: {{{title|}}} | <div class="title">{{{title}}}</div> |}}{{#if: {{#var:contents}} | {{#var:contents}}</div> |}}</includeonly></onlyinclude>
--><div class="{{#var:type}}box {{{class|}}}" style="{{#var:align}} width:{{{width|auto}}}; {{{style|}}}">{{#if: {{{title|}}} | <div class="title">{{{title}}}</div> |}}{{#if: {{#var:contents}} | {{#var:contents}}</div> |}}</includeonly></onlyinclude>
{{Box|title=Example|Default light box with a title.}}{{Box|dark|right|Dark box floated right.}}{{Clear}}
{{Box|title=Example|Default light box with a title.}}{{Box|dark|right|Dark box floated right.}}{{Clear}}


Line 48: Line 48:
{{Usage/Param|title|Title to be placed on the top of the box.|optional}}
{{Usage/Param|title|Title to be placed on the top of the box.|optional}}
{{Usage/Param|contents|Everything that goes inside the box.|optional}}
{{Usage/Param|contents|Everything that goes inside the box.|optional}}
There are also ''class'' and ''style'' parameters.


For contents that would be inconvenient to pass as an argument to a template due to high use of equal signs or pipe characters, such as tables, the contents can instead be included immediately ''after'' this template declaration and followed by {{Usage|sub=Bottom}}. ''e.g.'':
For contents that would be inconvenient to pass as an argument to a template due to high use of equal signs or pipe characters, such as tables, the contents can instead be included immediately ''after'' this template declaration and followed by {{Usage|sub=Bottom}}. ''e.g.'':

Navigation menu