Template:Click: Difference between revisions
From The Urban Dead Wiki
Jump to navigationJump to search
Cyberbob240 (talk | contribs) mNo edit summary |
The Rooster (talk | contribs) (Now works for images of any height, and widths upto 5 times the height) |
||
Line 1: | Line 1: | ||
<div style="position: relative; width: {{{width}}}; height: {{{height}}}; overflow: hidden"> | <includeonly><div style="position:relative; width:{{{width}}}; height:{{{height}}}; overflow:hidden"><div style="position:absolute; top:0; left:0">[[Image:{{{image}}}|{{{width}}}]]</div> | ||
<div style="position: absolute; top: | <div style="position:absolute; top:0; left:0; font-size:{{{height}}}; line-height:1; overflow:hidden">[[{{{link|Example Page}}}|     ]]</div></div></includeonly><noinclude> | ||
<div style="position: absolute; top: | |||
===Usage=== | ===Usage=== | ||
Give images your own link. | |||
*''link'' and ''image'' don't need square brackets. | |||
*''height'' and ''width'' must be specified in px and should match the image's size. | |||
*Warning: This will fail for images over five times wider than they are tall, the link will not extend across the whole way. | |||
*Note: Not recommended for signature images, stick with image redirects. | |||
===Example=== | |||
<pre> | |||
{{Click | {{Click | ||
|link= | |link=Example Page | ||
|image= | |image=Example.jpg | ||
| | |width=200px | ||
| | |height=150px | ||
}} | |||
</pre> | </pre> | ||
Will produce: | |||
{{Click | |||
|link=Example Page | |||
|image=Example.jpg | |||
|width=200px | |||
|height=150px | |||
}} | |||
[[Category:Utility Templates|{{PAGENAME}}]]</noinclude> |
Revision as of 18:35, 1 March 2010
Usage
Give images your own link.
- link and image don't need square brackets.
- height and width must be specified in px and should match the image's size.
- Warning: This will fail for images over five times wider than they are tall, the link will not extend across the whole way.
- Note: Not recommended for signature images, stick with image redirects.
Example
{{Click |link=Example Page |image=Example.jpg |width=200px |height=150px }}
Will produce: