Difference between revisions of "Template:Divbox/doc"

From blackwiki
Jump to navigation Jump to search
imported>WOSlinker
(→‎Available styles: update links)
imported>Thumperward
(update with new usage guidelines; re-add to category)
Line 1: Line 1:
This template is used to create coloured text background.
+
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 ==
  
=== 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''. This parameter is considered a complex style and is unsuitable for articles.
+
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.
* Note that complex styles should only be used on user pages, essays and project pages.
 
  
 
== 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]] -->
+
[[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.

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

amber
black
bloodred
blue
brown
forest
gold
gray
green
navy
none
orange
plain
purple
lilac
red
white
yellow
fawn
tt
greenv
grayh
email
double
wordperfect
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

There are seven metatemplates in the Module:Message box family:
  • {{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: