Jump to content

Template:Left66

From Wikiversity
Similar templates at English sister projects [edit]
wpd Wikipedia Left66
cms Commons Left66
wbk Wikibooks Left66
wsp Wikispecies Left66
wvy Wikiversity Left66

Note: This templates active code is hidden and only evinces when included.

This is primarily a quick boilerplate for '<div style=width:66%;>:But has some useful wrinkles:
  1. First, 66% was chosen with deliberate intent. Many standard templates are 250px and sit right, and this allows this template to bound the left side of a page which allows wide templates to be placed beside those right hugging narrow fixed width templates with room to spare on several page zoom selections. This value is based on experience with Microsoft IE6, which behaves badly on graphics at times. 66 will seem to leave a lot of waste space on some browsers, but zoom in, and the behavior maintains consistency until the page is blown up obnoxiously large on most browsers. That's a good thing, and the problem this was designed to solve.

  2. {{{1}}} will override '66' and allow a different percentage width.

  3. Named parameter {{{ALTCMND}}} or numbered parameters {{{2}}} and {{{3}}} (none have precedence) allow other HTML command syntax to be added including floating right, borders, padding, other margin commands, colors, fonts, etcetera.

  4. After coercing the enclosed following page materials, the template effect needs canceled by expression of {{Left66|end=1 (or yes, or anything but a blank space)}} or </div>.

  5. Quick and dirty convenience parameters: ('1' signifies any non-whitespace character.)


What it is Quick and dirty Quick and dirty effect Alternative parameter (and examples)
align data A=left/right/center align:{{{A}}}; or "align=align:left/right/center"
(specify all of it as quoted)
border command B=1 gives a 1px black border and defaults padding to 2em; or "border=border 3px blue grooved"
(specify all of it as quoted)
background BG=unquoted color both switch and value, becomes background:"{{{BG}}}" bgcolor=background:#f9f9e7
margins M=1 units margin:{{{M}}} units; (units must be given! em, ex, % or px) or "margin=margin: 1em 2em 3em 4em"
(specify all of it as quoted)
padding P=1 units padding: {{{P}}} units; (units must be given! em, ex, % or px) or "padding=padding: values"
(specify all of it as quoted)
vertical alignment V=1 valign={{{V}}} use any other free parameter
E/end/END=1 asserts </div> to terminate the block started by another of the same template. (Far less likely to get deleted by accident or ignorance by another editor!)
parameters {{{2|}}}, {{{3|}}}, and {{{ALTCMD|}}} are all "free" parameters which can be used to specify any legal HTML command within the style quotes, including fonts, line-heights, font size, etc.



Code look

<!--p/o Template:Left60 if subst'd (begins) -->
{{#if:{{{end|}}}{{{E|}}}{{{END|}}}|</div> |
<div style="{{{2|}}}; width:{{{width|{{{1|60}}}%}}}; {{#if:{{{B|}}}|border: 1px solid black;|{{{border|}}};}}<!---
-----
---->{{#if:{{{P|}}}|padding:{{{P}}}|{{{padding|}}}}}; <!-- NOT SHOWN, it defaults padding for Q&D  "B" to 2ex;  --
-----
---->{{#if:{{{BG|}}}|background:{{{BG}}}|{{{bgcolor|}}}}};<!---
-----
---->{{#if:{{{M|}}}|margin:{{{M}}}|{{{margin|}}}}}; {{#if:{{{A|}}}|align:{{{A}}}|{{{align|}}}}};<!---
-----
---->  {{#if:{{{V|}}}|valign={{{V}}};}} {{{ALTCMND|}}}; {{{3|}}}">}}<!--p/o Template:Left66 ---></includeonly>

Use to nest around another template precede OTHER templates... any or all of which insist on sitting to the right margin or over reaching into the right, when you need to place such side by side, or limit text towards the right side of the page.

Also used to coerce full width templates to being lesser space hogs allowing a different graphics option of a good kind, making room form interwiki navigation templates, images, etcetera, including the forcing of self centering templates (Many, but examples of {succession} or {succession box} used on category pages) to the left side.

This should also allow text to wrap around or within the redefined area.

Version

Version: 2008-07-08 fm Wikiversity/Wikispecies updates