Difference between revisions of "Template:Imagemargin"
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.) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<div id="tempmargin" style="margin-right: {{{2}}};">{{{1}}}</div> | <div id="tempmargin" style="margin-right: {{{2}}};">{{{1}}}</div> | ||
+ | <noinclude>{{documentation}} | ||
+ | [[Category:Templates]]</noinclude> |
Latest revision as of 07:26, 19 June 2022
{{{1}}}
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:
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.
The above documentation is transcluded from Template:Imagemargin/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |