Template:Superimpose/doc: Difference between revisions
Jump to navigation
Jump to search
(new) |
(usage (copied from talk)) |
||
Line 1: | Line 1: | ||
<includeonly>:''This template documentation is [[Wikipedia:Template doc page pattern|transcluded]] from [[{{FULLPAGENAME}}/doc]]'' [<span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}/doc|action=edit}} edit]</span>]</includeonly> | <includeonly>:''This template documentation is [[Wikipedia:Template doc page pattern|transcluded]] from [[{{FULLPAGENAME}}/doc]]'' [<span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}/doc|action=edit}} edit]</span>]</includeonly> | ||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->__NOTOC__ | ||
==Usage== | |||
===Example=== | |||
<div style="float: right;"> | |||
{{Superimpose| base = US_Locator_Blank.svg | |||
| base_width = 288px | |||
| base_caption = United States Locator Map | |||
| float = Locator_Dot.gif | |||
| float_width = 10px | |||
| float_caption = Boulder, Colorado | |||
| x = 83 | |||
| y = 53 | |||
}} | |||
</div> | |||
The wikicode below will create the image at right: | |||
<div style="margin-right: 300px;"> | |||
<pre> | |||
{{Superimpose| base = US_Locator_Blank.svg | |||
| base_width = 288px | |||
| base_caption = United States Locator Map | |||
| float = Locator_Dot.gif | |||
| float_width = 10px | |||
| float_caption = Boulder, Colorado | |||
| x = 83 | |||
| y = 53 | |||
}} | |||
</pre> | |||
</div> | |||
<div style="clear: both"></div> | |||
=== Using the Template === | |||
To get started, you can simply copy this blank definition into your page, and fill in the data. | |||
<pre> | |||
{{Superimpose| base = | |||
| base_width = | |||
| base_caption = | |||
| float = | |||
| float_width = | |||
| float_caption = | |||
| x = | |||
| y = | |||
}} | |||
</pre> | |||
=== Parameter Definitions === | |||
* '''base:''' File name of the base (bottom) image | |||
* '''base_width:''' Width to display the base image, ''in pixels'' | |||
* '''base_caption:''' Text to show when a user's mouse hovers over the base image | |||
* '''float:''' File name of the top image | |||
* '''float_width:''' Width to display the top image, ''in pixels'' | |||
* '''float_caption:''' Text to show when a user's mouse hovers over the top image | |||
* '''x:''' distance to offset the top image from the left edge of the base image, ''in pixels or any other CSS-standard units'' | |||
* '''y:''' distance to offset the top image from the top edge of the base image, ''in pixels or any other CSS-standard units'' | |||
=== A Note about the Locator Dot === | |||
I originally built this template thinking I could use an SVG file with transparency (mostly for the dot in locator maps). However, it seems Internet Explorer users can't handle transparent PNGs without a fix that Wikimedia's not yet delivering, so for now I recommend using the GIF version in the example above. When IE better supports PNGs, we can swap the better format back in. | |||
—[[User:Papayoung|Papayoung]] [[User_talk:Papayoung|☯]] 02:06, 26 October 2005 (UTC) | |||
<includeonly> | <includeonly> |
Revision as of 23:59, 13 October 2006
Usage
Example
The wikicode below will create the image at right:
{{Superimpose| base = US_Locator_Blank.svg | base_width = 288px | base_caption = United States Locator Map | float = Locator_Dot.gif | float_width = 10px | float_caption = Boulder, Colorado | x = 83 | y = 53 }}
Using the Template
To get started, you can simply copy this blank definition into your page, and fill in the data.
{{Superimpose| base = | base_width = | base_caption = | float = | float_width = | float_caption = | x = | y = }}
Parameter Definitions
- base: File name of the base (bottom) image
- base_width: Width to display the base image, in pixels
- base_caption: Text to show when a user's mouse hovers over the base image
- float: File name of the top image
- float_width: Width to display the top image, in pixels
- float_caption: Text to show when a user's mouse hovers over the top image
- x: distance to offset the top image from the left edge of the base image, in pixels or any other CSS-standard units
- y: distance to offset the top image from the top edge of the base image, in pixels or any other CSS-standard units
A Note about the Locator Dot
I originally built this template thinking I could use an SVG file with transparency (mostly for the dot in locator maps). However, it seems Internet Explorer users can't handle transparent PNGs without a fix that Wikimedia's not yet delivering, so for now I recommend using the GIF version in the example above. When IE better supports PNGs, we can swap the better format back in. —Papayoung ☯ 02:06, 26 October 2005 (UTC)