Template:Imagefix: Difference between revisions

From Songs of Syx Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="imagefix">{{{image}}}</div>
<div id="imagefix">{{{1}}}</div>
<noinclude>This is for fixing images that usually appear as icons at the very start of some articles. By default, if some templates are right above articles, it can mess up the alignment of said images. This templates fixes that so the image appears properly aligned.
<noinclude><br>{{Imagefix/doc}}[[Category:Templates]][[Category:Article_management_templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 01:18, 21 November 2021

{{{1}}}


Template Documentation

Description

As the name would imply, this template is used to fix the alignment for small images used at the very start of a paragraph or sentence. By default, MediaWiki misaligns some images when starting an article or section with them, by raising the image a few pixels above the text. This template fixes that and counters the misalignment by moving the image down a few pixels, aligning the image properly with the text. When certain templates are above the image, this can misalign images even more.

Syntax

{{imagefix|<IMAGE_FILE_LINK>|LEFT/RIGHT}} - Note that the left/right part of the syntax is technically not part of the template, but still required on this wiki for the image to be aligned to either side properly.

Examples

Header #1

 This page is a stub. You can help this page by adding more to it. Seriously, please do that.
Notice how the image is awkwardly aligned. The stub template is causing this, but this can occur even without templates above the image. It's not vertically matching up with the text as it should be. The reason for why and how MediaWiki causes this is currently unknown, but at least there's a fix for this. If you look at the next example header, you will see how this template can fix the alignment problem. Technology is an amazing thing. Where would we be without it? You guys ever ask yourselves that?

Header #2

 This page is a stub. You can help this page by adding more to it. Seriously, please do that.

Now this time, the image is aligned properly. The exact syntax used for this example is {{imagefix|[[File:employment_counter.png|left]]}}. This template can be used for any image, but its purpose is mainly to fix images at the very start of articles. Typing {{clear}} after the template can also fix the issue, but can cause unwanted results. The very text you're reading now is nothing more than just filler material, to give this paragraph a more "full" look - so that it somewhat matches the example above.