Difference between revisions of "Template:Divbox/doc"
imported>WOSlinker (→Available styles: update links) |
imported>Thumperward (update with new usage guidelines; re-add to category) |
||
| Line 1: | Line 1: | ||
| − | This template | + | This template can be used to create simple, flexible coloured text background. |
| + | |||
| + | Please note that this is intended to be a decorative template and not for use on the general encyclopedia: alternatives should be used for common tasks such as information panels ({{tl|infobox}}), quotations {{tl|quotebox}}) or navigation boxes ({{tl|navbox}}) in articles, while in other namespaces decoration should usually be avoided. This template will automatically add inappropriate uses to [[:category:articles using divbox template]] for cleanup. | ||
| + | |||
| + | == Usage == | ||
| − | |||
<nowiki>{{divbox|color of box|Headtitle|Message}}</nowiki> | <nowiki>{{divbox|color of box|Headtitle|Message}}</nowiki> | ||
| − | The parameter ''radius'' may be added for rounded corners using standard units, for example ''radius=8px'' | + | The parameter ''radius'' may be added for rounded corners using standard units, for example ''radius=8px''. |
== Available styles == | == Available styles == | ||
| Line 39: | Line 42: | ||
* The color names are case-dependent; they will not work if upper-case letters are used. | * The color names are case-dependent; they will not work if upper-case letters are used. | ||
* ''plain'', ''double'', ''tt'' and ''none'' inherit the page background colour whilst ''white'' forces a pure white background. | * ''plain'', ''double'', ''tt'' and ''none'' inherit the page background colour whilst ''white'' forces a pure white background. | ||
| − | |||
== Examples == | == Examples == | ||
| + | |||
{{div col|2}} | {{div col|2}} | ||
;Code | ;Code | ||
| Line 50: | Line 53: | ||
<code><nowiki>{{divbox|navy|radius=4em|Navy example|This is only an example of how this template works.}}</nowiki></code> | <code><nowiki>{{divbox|navy|radius=4em|Navy example|This is only an example of how this template works.}}</nowiki></code> | ||
;Result | ;Result | ||
| − | {{divbox|navy|radius=4em|Navy example|This is only an example of how this template works.}} | + | {{divbox|navy|radius=4em|Navy example|This is only an example of how this template works.}} |
{{div col end}} | {{div col end}} | ||
| + | |||
== See also == | == See also == | ||
* {{tl|divhide}} (for hiding things) | * {{tl|divhide}} (for hiding things) | ||
| − | |||
{{Mbox templates see also}} | {{Mbox templates see also}} | ||
<includeonly> | <includeonly> | ||
| − | + | [[Category:Wikipedia formatting templates|Divbox]] | |
| + | |||
[[ar:قالب:صندوق]] | [[ar:قالب:صندوق]] | ||
[[pt:Predefinição:Caixa]] | [[pt:Predefinição:Caixa]] | ||
[[simple:Template:Box]] | [[simple:Template:Box]] | ||
</includeonly> | </includeonly> | ||
Revision as of 11:51, 5 September 2011
This template can be used to create simple, flexible coloured text background.
Please note that this is intended to be a decorative template and not for use on the general encyclopedia: alternatives should be used for common tasks such as information panels ({{infobox}}), quotations {{quotebox}}) or navigation boxes ({{navbox}}) in articles, while in other namespaces decoration should usually be avoided. This template will automatically add inappropriate uses to category:articles using divbox template for cleanup.
Contents
Usage
{{divbox|color of box|Headtitle|Message}}
The parameter radius may be added for rounded corners using standard units, for example radius=8px.
Available styles
- Notes
- The color names are case-dependent; they will not work if upper-case letters are used.
- plain, double, tt and none inherit the page background colour whilst white forces a pure white background.
Examples
- Code
{{divbox|orange|Orange example|This is only an example of how this template works.}}
- Result
- Code
{{divbox|navy|radius=4em|Navy example|This is only an example of how this template works.}}
- Result
See also
- {{divhide}} (for hiding things)
- {{Ambox}}, for messageboxes on article pages.
- {{Cmbox}}, for messageboxes on category pages.
- {{Imbox}}, for messageboxes on file (image) pages.
- {{Tmbox}}, for messageboxes on talk pages.
- {{Fmbox}}, for header and footer messageboxes.
- {{Ombox}}, for messageboxes on other types of page.
- {{Mbox}}, for messageboxes that are used in different namespaces and change their presentation accordingly.
Closely related metatemplates:
- {{Asbox}}, for messageboxes in article stubs.
- {{Dmbox}}, for messageboxes on disambiguation or set-index pages.
- {{Ivmbox}}, a simple full-width box with default ivory background intended to frame important messages or notices.
Templates intended to be used in conjunction with Mboxes:
- {{Ombox/shortcut}}, an alternative to {{Shortcut}} for use in Mbox templates