Difference between revisions of "Template:Scroll image"

From SDA Knowledge Base

Jump to: navigation, search
(image scrolling template)
 
(No difference)

Latest revision as of 00:33, 14 September 2010

This template is used to display large images with scrollbars so users don't have to scroll the actual page itself to see it all.

Parameters

There are three unnamed parameters, only the first of which is mandatory, and one named parameter, which is optional.

Unnamed
  1. File name: Here you would put the name of the image with its extension, i.e. "Image name.png".
  2. Scrollbox height (n): Use this second parameter if you want to set the height of the scrollbox (not the height of the image itself). In most cases this parameter is unnecessary, as users are used to scrolling web pages vertically.
  3. Scrollbox width (n): The third parameter will set the width of the scrollbox (not the width of the image itself). In most cases you don't want to use this parameter, as the horizontal scrollbars will engage automatically if the image reaches the side of the screen.
Named
  • imagewidth (npx): this named parameter will set the width of the image itself (just like using [[Image:Image name.png|50px]] to set an image's width to 50 pixels wide).

Examples

{{scroll image|Image name.png}}
Basic usage, this displays the image just like normal, except horizontal scrollbars will appear if the image would go past the right edge of the screen.
{{scroll image|Image name.png|300|imagewidth=2000px}}
In this example, 300 pixels of the image would be shown vertically, and a scrollbar would be created to allow the user to scroll down to see the rest. The image would also be resized to 2,000 pixels wide. Note that the third parameter can safely be omitted.
{{scroll image|Image name.png||500}}
Here the image will be displayed at its natural height and a horizontal scrollbar will be added to scroll the image past 500 pixels of its width. Note the extra pipe to create a blank second parameter so the wiki knows not to treat "500" as the scrollbox height.
Personal tools