Template:Notice
Usage
This Notice template will create a box on a page which is useful for displaying messages or text which should be offset from the rest of the page contents. There are a few parameters, though not all are required. Additionally, this notice template is the basic template from which the rest of our templates are built.
Here's what the template looks like behind the scenes. The same can be viewed by editing this page.
<includeonly><table style="border: {{{border-width|1px}}} solid {{{border|#aaaaaa}}}; background-color: {{{bgcolor|#f9f9f9}}}; width: {{{width|80%}}}; margin: {{{margin|0 auto 1em auto}}}; padding: 0.2em; text-align: {{{align|left}}}; clear:{{{clear|both}}};"> <tr> <td style="vertical-align:middle; width:100%"> {{{message|{{{1|If you're seeing this message, insert "message=" at the start of your message to fix the problem.}}}}}} </td></tr></table></includeonly>
Refer to the Category:Templates page for the general information about templates and parameters.
Parameters
The parameters are the values wrapped in three curly braces. If separated by a pipe, the value following the pipe is a default value for that parameter, and can be left undefined.
- border-width
- thickness of the border, or leave undefined for the default width of 1px
- border
- color of the border, or leave blank for #aaaaaa
- bgcolor
- background color of the notice box, leave blank for grey
- width
- horizontal width of the notice box, leave blank for 80% of the page
- margin
- margin of the table, leave blank for "0 auto 1em auto"
- align
- text alignment within the box, default is left, other choices are center and right
- clear
- don't know. Leave default for "both"
- message
- the actual text to include on the page. All the above parameters can be left blank, but this one you'll likely want to use.
Example
The following example shows what will show up given the defined parameters.
{{Notice|message=This is a notice}}
This would leave the defaults in place for the rest of the undefined parameters, and would display the following:
This is a notice |
Pretty basic. Defining more parameters like this:
{{Notice|bgcolor=#CCCC00|width=10%|align=center|message='''This is a notice'''}}
...would create:
This is a notice |
Get it? Good.