Templat:FixBunching/doc

Daripada Wikipedia, ensiklopedia bebas.

Tempalt ini digunakan untuk membetulkan elemen-elemen terapung berkelakuan baik dengan yang lain pada margin kanan.

  • Dua simptom wikimarkup yang terumum yang bermuncul mengindikasikan bahawa ini seharusnya menggunakan ASAP, adalah:
    1. pautan terbitan bahagian yang bunched up dan dislocated (biasanya sesetengah ini akan digantikan dengan laman—frequently well down the page— and several will occur on the same line.)
    2. Box structures such as combinations of infoboxes with another or an image, where corners are offset so the right top margin of one HTML element is dislocated left of the left bottom corner of the preceding (in page text order) HTML box element. (i.e. These occurrences are not obvious in edit changes in any one given browser, but even new browsers such as IE7 can display one thing, and other modern browsers display some other look... as a problem for other readers.)
  • See Templat:Wpd, whose advice and techniques the template systematizes using the table elements method. (The div method fails in many cases on Microsoft browsers, in particular).

The original name of this template was {{FixHTML}} which was moved and so that name is now a redirect template still doing the same task. The two names are interchangeable and entirely equivalent.

Parameter[sunting sumber]

The template has been written to "be obvious" so it won't be deleted by accident by an editor ignorant of the benefits. It takes three simple arguments (variable names controlling output modes) beg(in), mid(dle), and end. If placed between right floating image elements, the mid call may be omitted safely.

  • It will take an optional parameter 'left', which if defined (e.g. "|left=1|beg") will float the enclosed elements left instead of the normal right.
  • Procedure is easy as 1, 2, 3...
    1. Place {{FixBunching|beg}} above the top image, infobox or other right floating HTML element.
    2. Place {{FixBunching|mid}} 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. Do not forget to do this! If this step is forgotten, then introductory text layout becomes seriously broken (the text is shoved to the left side of the screen, with a lot of whitespace in the middle) in some browsers, such as Opera.
    3. Place {{FixBunching|end}} BELOW the last (Bottom) image, infobox or other right floating HTML element.
    • When used as a left margin encapsulation, only the first line needs the left switch parameter ({{FixBunching|beg}})



  • It overcomes many inconvenient HTML parsing issues (usually a side effect of parsing HTML box elements in different order of display) from different internet browsers—since wikipedia articles of any complexity tend to over populate the right margin with such HTML elements (Pictures, infoboxes, history (reign/dynasty) boxes, etc.)
    • Consequently, ... this template can be used as a prophylactic measure to ensure a crowded page does not misbehave, for it was assidiously tested against known problem types on a half-dozen complicated article pages and each "fix" verified versus seven different browsers, including ones on the Macintosh and Unix systems.
  • When used, the template uses very little extra memory, and only a few tens of bytes of "Prexpansion template memory space", making it superior to Wikimarkup table elements it puts in place. Its very name and size (Comparative to "|-", "{|", or "|}" etc. prevents it being overlooked and misused in practice.

Example[sunting sumber]

{{FixBunching|begin}}
{{Military conflict infobox
| ... (contents)
}}
{{FixBunching|mid}}
{{Military campaign infobox
| ... (contents)
}}
{{FixBunching|mid}}
[[Image:Boy give finger to Kaiser.png|...]]
{{FixBunching|mid}}
[[Image:Kaiser Moons boy.png|...]
{{FixBunching|end}}

Lihat pula[sunting sumber]

  • {{stack}}, a simpler method to get the same result
Similar templates at English sister projects [edit]
mta Meta-wiki FixHTML
wpd Wikipedia FixHTML
cms Commons FixHTML
wbk Wikibooks FixHTML
wsp Wikispecies FixHTML
wvy Wikiversity FixHTML
This project now less under construction ...
Pardon our appearance whist we remodel,
pull the engine, and change the tires.