Template:Divbox: Difference between revisions

From Park Hill Wiki
Jump to navigation Jump to search
(Created page with "This template is used to create coloured text background. === Usage === <nowiki>{{divbox|color of box|Headtitle|Message}}</nowiki> The parameter ''radius'' may be added for...")
 
(Replaced content with " <div style="background:#d6f5f5;border:solid silver 1px;padding:1em;">")
Tag: Replaced
 
Line 1: Line 1:
This template is used to create coloured text background.


=== Usage ===
<div style="background:#d6f5f5;border:solid silver 1px;padding:1em;">
<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 image pages.
 
== Available styles ==
<div style="background:#f0f0f0;border:solid silver 1px;padding:1em;">
<div style="{{divstyleamber}}; width:5em; float:left; margin:.3em">amber</div>
<div style="{{divstyleblack}}; width:5em; float:left; margin:.3em">black</div>
<div style="{{divstylebloodred}}; width:5em; float:left; margin:.3em">bloodred</div>
<div style="{{divstyleblue}}; width:5em; float:left; margin:.3em">blue</div>
<div style="{{divstylebrown}}; width:5em; float:left; margin:.3em">brown</div>
<div style="{{divstyleforest}}; width:5em; float:left; margin:.3em">forest</div>
<div style="{{divstylegold}}; width:5em; float:left; margin:.3em">gold</div>
{{clear}}
<div style="{{divstylegray}}; width:5em; float:left; margin:.3em">gray</div>
<div style="{{divstylegreen}}; width:5em; float:left; margin:.3em">green</div>
<div style="{{divstylenavy}}; width:5em; float:left; margin:.3em">navy</div>
<div style="{{divstylenone}}; width:5em; float:left; margin:.3em">none</div>
<div style="{{divstyleorange}}; width:5em; float:left; margin:.3em">orange</div>
<div style="{{divstyleplain}}; width:5em; float:left; margin:.3em">plain</div>
<div style="{{divstylepurple}}; width:5em; float:left; margin:.3em">purple</div>
{{clear}}
<div style="{{divstylelilac}}; width:5em; float:left; margin:.3em">lilac</div>
<div style="{{divstylered}}; width:5em; float:left; margin:.3em">red</div>
<div style="{{divstylewhite}}; width:5em; float:left; margin:.3em">white</div>
<div style="{{divstyleyellow}}; width:5em; float:left; margin:.3em">yellow</div>
<div style="{{divstylefawn}}; width:5em; float:left; margin:.3em">fawn</div>
<div style="{{divstylett}}; width:5em; float:left; margin:.3em">tt</div>
<div style="{{divstylewordperfect}}; width:8em; float:left; margin:.3em">wordperfect</div>
{{clear}}
<div style="{{divstyleredv}}; width:4em; float:left; margin:.3em">redv</div>
<div style="{{divstyleorangev}}; width:4em; float:left; margin:.3em">orangev</div>
<div style="{{divstyleyellowv}}; width:4em; float:left; margin:.3em">yellowv</div>
<div style="{{divstylelimev}}; width:4em; float:left; margin:.3em">limev</div>
<div style="{{divstylebluev}}; width:4em; float:left; margin:.3em">bluev</div>
<div style="{{divstylepurplev}}; width:4em; float:left; margin:.3em">purplev</div>
<div style="{{divstylepinkv}}; width:4em; float:left; margin:.3em">pinkv</div>
{{clear}}
<div style="{{divstyletealv}}; width:4em; float:left; margin:.3em">tealv</div>
<div style="{{divstyleslatev}}; width:4em; float:left; margin:.3em">slatev</div>
<div style="{{divstylegreenv}}; width:4em; float:left; margin:.3em">greenv</div>
<div style="{{divstylegrayh}}; width:5em; float:left; margin:.3em">grayh</div>
<div style="{{divstyleemail}}; width:5em; float:left; margin:.3em">email</div>
<div style="{{divstyletweet}}; width:5em; float:left; margin:.3em">tweet</div>
<div style="{{divstyledouble}}; width:8em; float:left; margin:.3em">double</div>
{{clear}}</div>
;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 ==
<!-- {{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|navy|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}} -->
<noinclude>
 
[[Category:Template documentation]]
</noinclude>

Latest revision as of 13:14, 23 August 2020