Difference between revisions of "Template:Imagemargin"

From RimWorld Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
<div id="tempmargin" style="margin-right: {{{2}}};">{{{1}}}</div>
 
<div id="tempmargin" style="margin-right: {{{2}}};">{{{1}}}</div>
<noinclude>{{documentation}}</noinclude>
+
<noinclude>{{documentation}}
 +
[[Category:Templates]]</noinclude>

Latest revision as of 07:26, 19 June 2022

{{{1}}}
Documentation icon Template documentation[view] [edit] [history] [purge]

Description[edit]

This template simply turns the "margin-right" CSS function and makes it much easier to use. The primary focus is to add preview images to the top-right of pages, yet shift them to the left by a custom amount (which is to be defined in the template). This template is only for images that are aligned to the right.

Syntax[edit]

Type {{imagemargin|[[File:IMAGE.png]]|<# of pixels>}} where "# of pixels" is how many pixels you want the image to be shifted to the left.

Example[edit]

Note that [[File:BowlerHat.png|right]] would show this, aligned to the right:

BowlerHat.png

But using the template like this {{imagemargin|[[File:BowlerHat.png|right]]|300px}} would now show this:

BowlerHat.png

Note how the second image is pushed back to the left by 300 pixels, showing the purpose of the template.