From RimWorld Wiki
Revision as of 07:26, 19 June 2022 by Zippy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Documentation icon Template documentation[view] [edit] [history] [purge]


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.


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


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


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


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