Mr. Johnson (talk | contribs) m (Mr. Johnson moved page Template:Shadowbox/Documentation to Template:Box/Documentation without leaving a redirect) |
Mr. Johnson (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>[[Category:Box Template]]</includeonly> | <includeonly>[[Category:Box Template]]</includeonly> | ||
{{Template| | {{Template|Box}} is used to create styled text and image boxes. | ||
==Usage== | ==Usage== | ||
It accepts one {{Parameter|mandatory|string}} and one {{Parameter|optional|string}}. | It accepts one {{Parameter|mandatory|string}} and one {{Parameter|optional|string}}. |
Revision as of 21:53, 17 November 2023
Template:Box
is used to create styled text and image boxes.
Usage
It accepts one mandatory string parameter and one optional string parameter.
1
is the name of the article and the header for the text box.2
, if supplied, is the contents of the text box. If not supplied, the contents is transcluded from a subpage of the article, using the header as the subpage name. It also usesTemplate:Edit
to adds a link to directly edit the subpage.
It also accepts two optional named parameters:
width
acceptsXpx
orX%
, and controls the width of the box. If undefined, the box has10%
margins left and right.float
acceptsleft
,right
, orclear
.- If
left
orright
, the box is floated to the selected side of the screen and the margins and padding are setup coorespondingly. - If
clear
, the box is arranged clear of all content, above and below.
- If
color
(default:blue
) controls the color of the background. The valid options are: Template:Box/Color
Return
{{{Box|color=green|Lorem Ipsum|{{Lorem Ipsum|2}}}}
returns:
{{Box|Sample}}
returns:
No examples are included for float
, as they don't appear correctly inside Template:Return
.