Difference between revisions of "Template:Imagemargin"

From RimWorld Wiki
Jump to navigation Jump to search
(If it's okay, I'm making this so that those preview images I've been making have an easier way of being shifted to the left.)
 
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>

Revision as of 07:24, 19 June 2022

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

Description

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

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

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.