Welcome to our new Skyland! Article rewrites are welcome. If you see any missing images, please feel free to add them. Please use the Aboutfile template when uploading and add categories.
We are also aware of some articles being unavailable. Please bear with us while we are working to get them fixed.

Template:Cropper: Difference between revisions

From Skylanders Wiki
m Princess Nightmoon moved page Template:Imgcrop to Template:Cropper without leaving a redirect: Can be used for tables and other content too, so the img part is misleading.
Adjusted for page move.
Tag: sourceedit
Line 1: Line 1:
<div style="position:relative; height: {{{h|125}}}px; width: {{{w|140}}}px;">
<div style="position:relative; height: {{{h|125}}}px; width: {{{w|140}}}px;">
<div style="position: absolute; top: 0px; left: 0px; height: {{{h|125}}}px; width:{{{w|140}}}px; overflow: hidden">
<div style="position: absolute; top: 0px; left: 0px; height: {{{h|125}}}px; width:{{{w|140}}}px; overflow: hidden">
<div style="position: absolute; left: -{{{x|70}}}px; top: -{{{y|20}}}px; z-index: 2">{{{img|[[File:Spyro.jpg|300px|Spyro]]}}}}}
<div style="position: absolute; left: -{{{x|70}}}px; top: -{{{y|20}}}px; z-index: 2">{{{content|[[File:Spyro.jpg|300px|Spyro]]}}}}}
</div></div></div><noinclude>
</div></div></div><noinclude>
<br>'''Syntax'''
<br>'''Syntax'''
<pre>{{imgcrop|img=<filename>|x=<posx>|y=<posy>|h=<height>|w=<width>}}</pre>
<pre>{{cropper|content=<content>|x=<posx>|y=<posy>|h=<height>|w=<width>}}</pre>
This template is used to display cropped images.
This template is used to display cropped content, mainly images.


'''Preview code'''
'''Preview code'''
<pre>{{imgcrop|img=[[File:Spyro.jpg|300px]]|x=70|y=20|h=125|w=140}}</pre>
<pre>{{cropper|content=[[File:Spyro.jpg|300px]]|x=70|y=20|h=125|w=140}}</pre>
Resulting in a cropped image of Spyro (resized to 300px) with a position of x=70, y=20 and dimensions of h=125, w=140.
Resulting in a cropped image of Spyro (resized to 300px) with a position of x=70, y=20 and dimensions of h=125, w=140.
[[Category: Templates]]
</noinclude>
</noinclude>

Revision as of 09:58, August 9, 2016

Spyro}}


Syntax

{{cropper|content=<content>|x=<posx>|y=<posy>|h=<height>|w=<width>}}

This template is used to display cropped content, mainly images.

Preview code

{{cropper|content=[[File:Spyro.jpg|300px]]|x=70|y=20|h=125|w=140}}

Resulting in a cropped image of Spyro (resized to 300px) with a position of x=70, y=20 and dimensions of h=125, w=140.