Template:Imagefix: Difference between revisions

From Songs of Syx Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<div id="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. Here's an example.
<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 template fixes that so the image appears properly aligned. Here's an example.


== Header #1 ==
== Header #1 ==
Line 8: Line 8:
== Header #2 ==
== Header #2 ==
{{stub}}
{{stub}}
{{imagefix|image=[[File:employment_counter.png|left]]}}Notice how the image is awkwardly aligned. It's not vertically matching up with the text as it should be. The stub template is the cause of this. Most other similar templates will cause this exact same problem. The reason for 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?
{{imagefix|[[File:employment_counter.png|left]]}}Now this time, the image is aligned properly. This can also be fixed by - in this exact case - typing <code><nowiki>{{clear}}</nowiki></code> right after the <code><nowiki>{{stub}}</nowiki></code> that makes the stub template. Note that using the "clear" thing doesn't always create the best results, and can add further issues to image and text alignment. Even if a template isn't above an article, using this "imagefix" template can still provide some help.
 
== Syntax ==
How this image-fixing template is used is as follows: <code><nowiki>{{imagefix|


[[Category:Templates]][[Category:Article_management_templates]]</noinclude>
[[Category:Templates]][[Category:Article_management_templates]]</noinclude>

Revision as of 00:26, 30 June 2021

{{{1}}}

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 template fixes that so the image appears properly aligned. Here's an example.

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. It's not vertically matching up with the text as it should be. The stub template is the cause of this. Most other similar templates will cause this exact same problem. The reason for 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. This can also be fixed by - in this exact case - typing {{clear}} right after the {{stub}} that makes the stub template. Note that using the "clear" thing doesn't always create the best results, and can add further issues to image and text alignment. Even if a template isn't above an article, using this "imagefix" template can still provide some help.

Syntax

How this image-fixing template is used is as follows: <nowiki>{{imagefix|