Template:Generic box: Difference between revisions
Jump to navigation
Jump to search
Ian Oliver (talk | contribs) (created template) |
Ian Oliver (talk | contribs) (added options for color of text, border, and background) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{| style="color: #000000; border: 1px solid #A8A8A8; padding: 0.5em; margin: 0.5em 0; background-color: #FFFFFF; font-size:95%; vertical-align: middle;" | {| style="color: {{{textcolor|#000000}}}; border: 1px solid {{{bordercolor|#A8A8A8}}}; padding: 0.5em; margin: 0.5em 0; background-color: {{{bgcolor|#FFFFFF}}}; font-size:95%; vertical-align: middle;" | ||
|{{{1}}} | |{{{1}}} | ||
|} | |} | ||
</includeonly><noinclude>Use this template to put text in a box for whatever purpose you need. | </includeonly><noinclude>Use this template to put text in a box for whatever purpose you need. The text to put in the box is given in positional argument 1. The text, border, and background colors are configurable using optional <code>textcolor</code>, <code>bordercolor</code>, and <code>bgcolor</code> arguments. (Because these are named, their positions don't matter. But the text needs to be the first argument.) | ||
<pre>{{generic box|Hello there!}}</pre> | ==Examples== | ||
{{generic box| | {| class="wikitable" | ||
|- | |||
! Code !! Result | |||
|- | |||
| <pre>{{generic box|Hello there!}}</pre> || {{generic box|Hello there!}} | |||
|- | |||
| <pre>{{generic box|Go away!|textcolor=red|bordercolor=orange|bgcolor=black}}</pre> || {{generic box|Go away!|textcolor=red|bordercolor=orange|bgcolor=black}} | |||
|} |
Revision as of 04:37, 2 June 2016
Use this template to put text in a box for whatever purpose you need. The text to put in the box is given in positional argument 1. The text, border, and background colors are configurable using optional textcolor
, bordercolor
, and bgcolor
arguments. (Because these are named, their positions don't matter. But the text needs to be the first argument.)
Examples
Code | Result | |
---|---|---|
{{generic box|Hello there!}} |
| |
{{generic box|Go away!|textcolor=red|bordercolor=orange|bgcolor=black}} |
|