Jump to content

Template:FixBunching: Difference between revisions

From IdeaWazaWiki
wikademia>Fabartus
++<br />
wikademia>Wikademia
m 35 revisions
 
(31 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{#switch:{{{1|}}}
<includeonly>{{#switch:{{lc:{{{1|}}}}}
|beg|Beg|BEG|begin|Begin|BEGIN=<!--
|beg|begin|top=<!--
  --><includeonly>{{{!}}style="float:right; margin 0 0 .25 .25; "
  -->{{{!}}style="background:transparent; float:{{{float|{{#if:{{{left|}}}|left|right}}}}}; <!--
<br />{{!}} <!--This line confines right floating elements in a table, the newline is necessary after this comment -->
-->margin:{{#if:{{{left|}}}<!--
</includeonly><noinclude><br>table initialization</noinclude>
=== -->|{{{margin|0 1em 0.5em 0}}}<!--
=== -->|{{{margin|0 0 0.5em 1em}}} <!--
-->}}; <!-- Endif:Right/Left
-->{{#if:{{{padding|}}} <!--
=== -->|{{{padding}}}<!--
=== -->|{{#if:{{{PL|}}}|padding:.25em 0 .25em .75em}}<!--
-->}}; "
{{!}}<!--This line confines right floating elements in a table, the newline here is necessary after this comment -->


|mid|Mid|MID|Middle|MIDDLE=<!--
|mid|middle=<!--
  --><includeonly><br />{{!}}-
  -->{{!}}-
{{!}}
<!-- above newline needed. This line separates elements into the next table cell down
--></includeonly><noinclude><br>table row break</noinclude>
|end|End|END=<!--
--><includeonly><br />{{!}}}
<!-- above newline needed


This line separates terminates the table cell
{{!}}<!-- this trailing newline needed.
  --></includeonly><noinclude><br>table end element</noinclude>
---      This line separates elements into the next table cell down
|#default=<font color="red"><big>Parameter not given Error...</big></font><br />''Template {{tl2|fixHTML}} (generator) needs <code> '''<nowiki>{{{1}}}</nowiki> ''defined''''' </code> as one of: {The sets: '''<nowiki>|beg|Beg|BEG</nowiki>''' or '''<nowiki>|mid|Mid|MID</nowiki>''' or '''<nowiki>|end|End|END</nowiki>''' }.
  -->
}}<noinclude><br><hr><small><center><div style="width:50%; border:1px solid; float:center; clear:both; ">The above error message is generated because this template page has no <code> '''<nowiki>{{{1}}}</nowiki> ''defined''''' </code>, and it uses a parser function switch to combine all formatting needs into this one template.</div></center></small>
|end|bot|bottom=<!--
;per [[Wikipedia:How to fix bunched-up edit links]] a related problem... :This template is used to make right floating elements behave with others on the right margin.
-->{{!}}}
* As it has an auto width, the largest width enclosed element will set a boundary for the others.
*Procedure is easy as 1, 2, 3...
*# Place {{Tlx|FixHTML|begin}} above the top image, infobox or other right floating HTML element.
*# Place {{Tlx|FixHTML|middle}} above the next image, infobox or other right floating HTML element. And the next ... And the next ... And the next ... And the next, as needed.
Place {{Tlx|FixHTML|end}} '''BELOW''' the last (Bottom) image, infobox or other right floating HTML element.
 
;Example using Miltary Info boxes
<pre>
{{FixHTML|begin}}
{{Military conflict infobox
| ... (contents)
}}
{{FixHTML|mid}}
{{Military campaign infobox
| ... (contents)
}}
{{FixHTML|mid}}
[[Image:Boy give finger to Kaiser.png|...]]
{{FixHTML|mid}}
[[Image:Kaiser Moons boy.png|...]
{{FixHTML|end}}
 
</pre>
'''Social communications in War'' spans a vast array of methods ... <g>


<!-- above newline needed


[[Category:Formatting templates|{{PAGENAME}}]]
This line terminates the table cell
[[Category:MSIE font fix templates|{{PAGENAME}}]]
-->
[[Category:typing-aid templates|{{PAGENAME}}]]
|#default=<strong class="error">Parameter not given Error... Template {{tl2|FixBunching}} needs its first parameter as beg[in], mid[dle], or end.</strong>
}}</includeonly><noinclude>
'''FixBunching (FixHTML)''' can be used for left float HTML elements by defining either of two parameters:
{{I}}{{para|left}} (to anything, e.g. "{{para|left|1}}")
{{I}}or {{para|float|left}} (or {{para|float|center}})
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 06:15, 27 April 2009

FixBunching (FixHTML) can be used for left float HTML elements by defining either of two parameters: Template:ITemplate:Para (to anything, e.g. "Template:Para") Template:Ior Template:Para (or Template:Para)

[create] Template documentation