Jump to content

Template:Note div

From Wikiversity

Version-at-a-glance...

source: Commons, tweak logic of case "{{{B}}}=" defined, vs. "{{{border}}}" (which worked as expected, while "B" didn't). // FrankB 18:57, 19 August 2008 (UTC)
Original= Source:Commons, Adapt {{usage div}} to pastel green for category annotations. // FrankB 05:10, 19 August 2008 (UTC)
Similar templates at English sister projects [edit]
wpd Wikipedia Note div
cms Commons Note div
wbk Wikibooks Note div
wsp Wikispecies Note div
wvy Wikiversity Note div
This template provides uniform colorized background for template usage notes.
Usage
  1. Just apply the template. If {{{1|}}} is defined (indicating you mean to surround text), a close-div will be generated automatically.
  2. Otherwise a matching "close-div" ("</div>") should be given by the end of the page.
  3. Some other optional HTML control parameters may be given, the syntax is modeled on {{Left66}}.
code
<div style="background:{{{BG|#ddffcc}}};
 margin:{{{M|{{{margin|10px}}}}}};
 padding:{{{P|{{{padding|5px}}}}}};
 {{#if:{{{B|}}}{{{border|}}}|
 border:{{#if:{{{B|}}}|{{#if:{{{border}}}
  |{{{border}}};|1px solid black;}}
  |{{{border}}};}}"
>
Color appears as the background here.