Difference between revisions of "Template:Divbox/doc"

From blackwiki
Jump to navigation Jump to search
imported>Fæ
(update)
imported>Fæ
(update)
Line 5: Line 5:
  
 
The parameter ''radius'' may be added for rounded corners. This parameter is considered a complex style and is unsuitable for articles.
 
The parameter ''radius'' may be added for rounded corners. This parameter is considered a complex style and is unsuitable for articles.
 
== Examples ==
 
{{div col|2}}
 
;Code
 
<code><nowiki>{{divbox|orange|Orange example|This is only an example of how this template works.}}</nowiki></code>
 
;Result
 
{{divbox|orange|Orange example|This is only an example of how this template works.}}
 
;Code
 
<code><nowiki>{{divbox|greenv|radius=4em|Navy example|This is only an example of how this template works.}}</nowiki></code>
 
;Result
 
{{divbox|navy|radius=4em|Navy example|This is only an example of how this template works.}}
 
{{div col end}}
 
The color names are case-dependent; they will not work if upper-case letters are used.
 
  
 
== Available styles ==
 
== Available styles ==
Line 45: Line 32:
 
<div style="{{divstylewordperfect}}; width:11.7em; float:left; margin:.3em">wordperfect</div>
 
<div style="{{divstylewordperfect}}; width:11.7em; float:left; margin:.3em">wordperfect</div>
 
{{clear}}
 
{{clear}}
 +
;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.
 
* ''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.
 
* Note that complex styles should only be used on user pages, essays and project pages.
  
 +
== Examples ==
 +
{{div col|2}}
 +
;Code
 +
<code><nowiki>{{divbox|orange|Orange example|This is only an example of how this template works.}}</nowiki></code>
 +
;Result
 +
{{divbox|orange|Orange example|This is only an example of how this template works.}}
 +
;Code
 +
<code><nowiki>{{divbox|greenv|radius=4em|Navy example|This is only an example of how this template works.}}</nowiki></code>
 +
;Result
 +
{{divbox|navy|radius=4em|Navy example|This is only an example of how this template works.}}
 +
{{div col end}}
 
== See also ==
 
== See also ==
 
* {{tl|divhide}} (for hiding things)
 
* {{tl|divhide}} (for hiding things)

Revision as of 13:07, 12 November 2010

This template is used to create coloured text background.

Usage

{{divbox|color of box|Headtitle|Message}}

The parameter radius may be added for rounded corners. This parameter is considered a complex style and is unsuitable for articles.

Available styles

amber
black
bloodred
blue
brown
forest
gold
gray
green
navy
none
orange
plain
purple
lilac
red
white
yellow
fawn
greenv
grayh
tt
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.
  • Note that complex styles should only be used on user pages, essays and project pages.

Examples

Code

{{divbox|orange|Orange example|This is only an example of how this template works.}}

Result
Code

{{divbox|greenv|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: