Template:Box

From Cannabis
Jump to: navigation, search

{{Box|LINK|COLOR|TEXT}}

  • For example; {{box|Moscow, Idaho|lime|Moscow}} Moscow

See this discussion: Need a template for a blue link in a yellow box with a red border.

For Firefox-only wrapping problem see:

"border-radius: 7px;" in the template code determines how rounded the corners are.

"padding: 0 3px;" and "border: 2px solid" in the template code allows the boxes to stack without overlapping:

Canada
Canada


  • Wikipedia: Web colors. Named colors and hex colors work. Capitalization does not matter in named colors. Put # in front of hex colors. Spaces must be removed from hex numbers. The 3-digit shorthand versions of hex colors work too.
Second parameter for color.
Input Output
{{Box|Canada|green}} Canada
{{Box|[[Canada]]|green}} Canada
No border
Input Output
{{Box|Canada| -}} Canada
{{Box|Canada| }} Canada
{{Box|Canada|transparent}} Canada

See:

[[Canada]]

Canada

[[wikipedia:Health care in Canada]]

wikipedia:Health care in Canada

http://en.wikipedia.org/wiki/Health_care_in_Canada

http://en.wikipedia.org/wiki/Health_care_in_Canada

[http://en.wikipedia.org/wiki/Health_care_in_Canada]

[1]
No brackets
Input Output
{{Box}}
{{Box|}}
{{Box||}}
{{Box|Canada}} - "Canada" linked. Canada
{{Box|||Canada}} - "Canada" unlinked. Canada
Interwiki link plus label:

{{Box|wikipedia:Health care in Canada||Canada}}

Canada
External link plus label:

{{Box|http://en.wikipedia.org/wiki/Health_care_in_Canada||Canada}}

Canada
External link as linked bare URL:

{{Box|http://en.wikipedia.org/wiki/Health_care_in_Canada||http://en.wikipedia.org/wiki/Health_care_in_Canada}}

http://en.wikipedia.org/wiki/Health_care_in_Canada
Unlinked black bold text:

{{Box|||$4,608}}

$4,608
Brackets.
Input Output
{{Box|[[Canada]]}} Canada
{{Box|[[wikipedia:Health care in Canada]]||Canada}} Canada
{{Box|[http://en.wikipedia.org/wiki/Health_care_in_Canada]||Canada}} Canada
Full bare URL as first parameter. Other parameters left empty
Input Output
{{Box|http://en.wikipedia.org/wiki/Health_care_in_Canada}} [2]
Full bare URL as 3rd parameter. Other parameters left empty
Input Output
{{Box|||http://en.wikipedia.org/wiki/Health_care_in_Canada}} http://en.wikipedia.org/wiki/Health_care_in_Canada