Difference between revisions of "Template:Left66"

From Arkaz
Jump to: navigation, search
(New page: <includeonly><!--p/o Template:Left66 if subst'd (begins) --> {{#if:{{{end|}}}{{{E|}}}{{{END|}}}|</div> | <div style="{{{2|}}}; width:{{{width|{{{1|66}}}%}}}; {{#if:{{{B|}}}|border: 1px sol...)
 
 
Line 3: Line 3:
 
<div style="{{{2|}}}; width:{{{width|{{{1|66}}}%}}}; {{#if:{{{B|}}}|border: 1px solid black;|{{{border|}}};}}<!---
 
<div style="{{{2|}}}; width:{{{width|{{{1|66}}}%}}}; {{#if:{{{B|}}}|border: 1px solid black;|{{{border|}}};}}<!---
 
-----
 
-----
---->{{#if:{{{P|}}}|padding:{{{P}}}|{{{padding|}}}}}; {{#if:{{{BG|}}}|background:{{{BG}}}|{{{bgcolor|}}}}};<!---
+
---->{{#if:{{{P|}}}{{{B|}}}{{{padding|}}}<!--
 +
    -->|padding:<!--
 +
        -->{{#if:{{{P|}}}<!--
 +
          -->|{{{P}}}<!--
 +
          -->|{{#if:{{{B|}}}<!--
 +
            -->|<!-- else default for Q&D  "B" -->2ex;<!--
 +
            -->|{{{padding|}}}<!--
 +
          -->}}<!--
 +
        -->}}<!--
 +
  -->}}; {{#if:{{{BG|}}}{{{bgcolor|}}}|background:{{{BG}}}{{{bgcolor|}}}}};<!---
 
-----
 
-----
 
---->{{#if:{{{M|}}}|margin:{{{M}}}|{{{margin|}}}}}; {{#if:{{{A|}}}|align:{{{A}}}|{{{align|}}}}};<!---
 
---->{{#if:{{{M|}}}|margin:{{{M}}}|{{{margin|}}}}}; {{#if:{{{A|}}}|align:{{{A}}}|{{{align|}}}}};<!---
 
-----
 
-----
---->  {{#if:{{{V|}}}|valign={{{V}}};}} {{{ALTCMND|}}}; {{{3|}}}">}}<!--p/o Template:Left60 ---></includeonly>
+
---->  {{#if:{{{V|}}}|valign={{{V}}};}} {{{ALTCMND|}}}; {{{3|}}}">}}<!--p/o Template:Left60 ---></includeonly><noinclude><!--
<noinclude><!---
+
{{Documentation subpage}} Drat these... and the system... this template doesn't need template doc page pattern [[WP:DPP]]... you guys are breaking portability unnecessarily! Some sisters don't like /doc pages!!!
 +
 
 +
<xx!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -- xxx>
 +
<x!---
 
-----
 
-----
 
{{{1|}}}</div> --- This form doesn't handle multiple templates well as the language templates {s.a.: 'en', 'de', 'fr', etcetera.} on the commons. So switching to open div format 1 March 2007  
 
{{{1|}}}</div> --- This form doesn't handle multiple templates well as the language templates {s.a.: 'en', 'de', 'fr', etcetera.} on the commons. So switching to open div format 1 March 2007  
 
-----
 
-----
 
---->
 
---->
{{interwikitmp-grp|V=3|wdy=|wqt=|wbk=|wnw=|mdw=}}<!---
+
{{interwikitmp-grp|V=3|wdy=|wqt=|wnw=|mdw=|mta=}}<!---
 
-----
 
-----
 
----><b>Note:</b> This templates active code is hidden and only evinces when included.<!---
 
----><b>Note:</b> This templates active code is hidden and only evinces when included.<!---
Line 22: Line 34:
 
# 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.<br /><br />
 
# 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.<br /><br />
 
# <nowiki> {{{1}}} </nowiki> will override '66' and allow a different percentage width.<br /><br />
 
# <nowiki> {{{1}}} </nowiki> will override '66' and allow a different percentage width.<br /><br />
# Named parameter <nowiki> {{{ALTCMND}}} or numbered parameters {{{2}}} and {{{3}}}</nowiki>  (none have precedence) allow other HTML and Css command sytax to be added including borders, padding, other margin commands, colors, fonts, etcetera.<br /><br />
+
# Named parameter <nowiki> {{{ALTCMND}}} or numbered parameters {{{2}}} and {{{3}}}</nowiki>  (none have precedence) allow other HTML command syntax to be added including '''floating right''', borders, padding, other margin commands, colors, fonts, etcetera.<br /><br />
# After coercing the enclosed following page materials, the template effect needs canceled by expression of {{Tlx|Left60|<nowiki>end=1 (or yes, or anything but a blank space</nowiki>)}} or '''&lt;/div>'''.<br /><br />
+
# After coercing the enclosed following page materials, the template effect needs canceled by expression of {{Tlx|Left66|<nowiki>end=1 (or yes, or anything but a blank space</nowiki>)}} or '''&lt;/div>'''.<br /><br />
 
# Quick and dirty convenience parameters: ''('1' signifies any non-whitespace character.)''
 
# Quick and dirty convenience parameters: ''('1' signifies any non-whitespace character.)''
 +
  
 
{| style="border:2px blue solid; margin:3em 0 3em 0;padding: 1em; background:#99e9e7; font:strong; size:4; color:DarkBlue;"
 
{| style="border:2px blue solid; margin:3em 0 3em 0;padding: 1em; background:#99e9e7; font:strong; size:4; color:DarkBlue;"
Line 39: Line 52:
 
| border command
 
| border command
 
| B=1  
 
| B=1  
|gives a 1px black '''border'''  
+
|gives a 1px black '''border''' and defaults padding to 2em;
 
| '''or''' "border=border 3px blue grooved"<br>(specify all of it as quoted)
 
| '''or''' "border=border 3px blue grooved"<br>(specify all of it as quoted)
 
|- bgcolor="azure"
 
|- bgcolor="azure"
Line 48: Line 61:
 
|-
 
|-
 
| margins
 
| margins
| M=1
+
| M=1 units
| margin:{{{M}}};
+
| margin:{{{M}}} units; (units must be given! em, ex, % or px)
 
| '''or''' "margin=margin: 1em 2em 3em 4em"<br>(specify all of it as quoted)
 
| '''or''' "margin=margin: 1em 2em 3em 4em"<br>(specify all of it as quoted)
 
|- bgcolor="azure"
 
|- bgcolor="azure"
 
| padding
 
| padding
| P=1
+
| P=1 units
| padding: {{{P}}};
+
| padding: {{{P}}} units; (units must be given! em, ex, % or px)
 
| '''or''' "padding=padding: ''values''"<br>(specify all of it as quoted)
 
| '''or''' "padding=padding: ''values''"<br>(specify all of it as quoted)
 
|-
 
|-
Line 78: Line 91:
 
<div style="{{{2|}}}; width:{{{width|{{{1|60}}}%}}}; {{#if:{{{B|}}}|border: 1px solid black;|{{{border|}}};}}<!---
 
<div style="{{{2|}}}; width:{{{width|{{{1|60}}}%}}}; {{#if:{{{B|}}}|border: 1px solid black;|{{{border|}}};}}<!---
 
-----
 
-----
---->{{#if:{{{P|}}}|padding:{{{P}}}|{{{padding|}}}}}; {{#if:{{{BG|}}}|background:{{{BG}}}|{{{bgcolor|}}}}};<!---
+
---->{{#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:{{{M|}}}|margin:{{{M}}}|{{{margin|}}}}}; {{#if:{{{A|}}}|align:{{{A}}}|{{{align|}}}}};<!---
 
-----
 
-----
---->  {{#if:{{{V|}}}|valign={{{V}}};}} {{{ALTCMND|}}}; {{{3|}}}">}}<!--p/o Template:Left60 ---></includeonly>
+
---->  {{#if:{{{V|}}}|valign={{{V}}};}} {{{ALTCMND|}}}; {{{3|}}}">}}<!--p/o Template:Left66 ---></includeonly>
  
 
</pre>
 
</pre>
Line 90: Line 105:
  
 
This should also allow text to wrap around or within the redefined area.
 
This should also allow text to wrap around or within the redefined area.
 +
{{Left66|B=1|BG=#A7F9F9|33}}
 +
;Version
  
 +
Version: 2008-07-08 fm Wikiversity/Wikispecies updates+spc fix
 +
on Wikipedia <b>[[User:Fabartus|Fra]]</b><font color="green">[[User talk:Fabartus|nkB]]</font> 04:00, 8 July 2008 (UTC)
 +
</div>
 +
 +
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
 
[[Category:Utility templates used in categories |{{PAGENAME}} ]]
 
[[Category:Utility templates used in categories |{{PAGENAME}} ]]
[[Category:formatting templates |{{PAGENAME}}]]
+
[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]
 
[[Category:typing-aid templates |{{PAGENAME}}]]<!--- Keep for compatibility with en.wp ---->
 
[[Category:typing-aid templates |{{PAGENAME}}]]<!--- Keep for compatibility with en.wp ---->
 
 
</noinclude>
 
</noinclude>

Latest revision as of 11:36, 9 March 2009

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

Usage

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+spc fix on Wikipedia FrankB 04:00, 8 July 2008 (UTC)