Template:Wide image: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:
|none= tnone" style="
|none= tnone" style="
|#default=tnone" style="margin-left: auto; margin-right:auto;
|#default=tnone" style="margin-left: auto; margin-right:auto;
}} width:{{{4|99%}}};>
}} width:{{{4|99%}}}; max-width:{{#expr:{{str sub|{{{2}}}|0|{{#expr:{{str find|{{{2}}}|px}} -1}}}} + 8}}px;">
<div class="thumbinner"><div class="overflowbugx" style="overflow:auto;{{#ifeq:{{{dir|}}}|rtl|direction:rtl;}}">[[File:{{{1}}}|{{{2}}}|{{#switch:{{{3}}}
<div class="thumbinner"><div class="overflowbugx" style="overflow:auto;{{#ifeq:{{{dir|}}}|rtl|direction:rtl;}}">[[File:{{{1}}}|{{{2}}}|{{#switch:{{{3}}}
|thumb
|thumb

Revision as of 18:16, April 26, 2015


Usage

This template is to be used when setting images that are too wide to fit on the page while maintaining its clear visualization. It works as a thumbnail that uses a scroll box if the image is too large.

{{Wide image
|1=image name
|2=desired image width
|3=caption.
|4=frame width (99% is the default)
|5=frame alignment: left, right or none (center is the default)
|dir=Insert "rtl" if you want the right side of the image to appear initially (left to right is the default)
|}

Note: only the parameters 1 and 2 are required. Insert the others if needed on that case.

Examples

Basic

This:

{{Wide image|World 1-1 SMB.png|1992px}}

Results in: <div class="thumb tnone" style="margin-left: auto; margin-right:auto; width:99%; max-width:Expression error: Unrecognized punctuation character "[".px;">

With caption

This:

{{Wide image|World 1-1 SMB.png|1992px|'''World 1-1''' of ''[[Super Mario Bros.]]''.}}

Results in: <div class="thumb tnone" style="margin-left: auto; margin-right:auto; width:99%; max-width:Expression error: Unrecognized punctuation character "[".px;">

Aligned on left or right

This:

{{Wide image|World 1-1 SMB.png|1992px|'''World 1-1''' of ''[[Super Mario Bros.]]''.|45%|right}}
If ''left'' or ''right'' is used, the text after the template will be aligned with it.

Results in: <div class="thumb tright" style=" width:45%; max-width:Expression error: Unrecognized punctuation character "[".px;">

If left or right is used, the text after the template will be aligned with it.

Not aligned

This:

{{Wide image|World 1-1 SMB.png|1992px|'''World 1-1''' of ''[[Super Mario Bros.]]''.|45%|none}}
If ''none'' is used, the text after the template will appear under it.

Results in: <div class="thumb tnone" style=" width:45%; max-width:Expression error: Unrecognized punctuation character "[".px;">

If none is used, the text after the template will appear under it.

Scrolls right to left

This:

{{Wide image|World 1-1 SMB.png|1992px|'''World 1-1''' of ''[[Super Mario Bros.]]''.
|dir=rtl}}

Results in: <div class="thumb tnone" style="margin-left: auto; margin-right:auto; width:99%; max-width:Expression error: Unrecognized punctuation character "[".px;">

Template:BoxTop Credit goes to Wikipedia. Click here to check out the original template.