Template:Gallery/doc

This template provides advanced gallery building functionality (such as scrolling captions and fine-tuned formatting control). For creating basic galleries, use the Gallery tag.

This template shows up to 110 images in an array, wrapped as left-to-right rows, where all images can be set to the same "width=" or "height=" but also allow width exceptions such as "width3=140" to reset width of only image 3. The number of images per row is based upon the image-width specified and the width of the screen, and can change live as the users narrow their screens and the images re-wrap to view the window as a different size.

For style guidelines about where galleries are appropriate, see CP:IG.

For each image
Specify a line of the following form for each image.


 *   is the image's file name. It can use a   instead of an   prefix.
 *   should be " " for the first image, " " for the second image, and so forth.
 *   is the alt text for the image, used by visually impaired or other readers who cannot see the image clearly. See CorporisPublica:Alternative text for images. If omitted, the image's alt text will be blank.
 *   is the caption under the image; see CorporisPublica:Captions.

If no such lines are present, a gallery with a single blank image is produced. There is currently a limit of 110 image lines.

Optional parameters
The following parameters apply to all images:


 * – The gallery's title.
 * – (default: 180) Maximum height of each image.
 * – (default: 180) Maximum width of each image.
 * – (default: width) Width of each image cell or box.
 * – (default: 2) The number of text lines needed for the largest caption. Blank lines are appended to smaller captions. A caption that does not fit is cut off.
 * – (default: left) The alignment of the gallery table (left, center, or right).
 * – Small, right-aligned text below the images.
 * – The CSS style directives for the whole table.

The following parameters apply to each image, separately:


 * – the alt-text for image 1.
 * – (default: width or 180) width of image 1 only.
 * – the alt-text for image 2.
 * – (default: width or 180) width of image 2 only.
 * – the alt-text for image 110.
 * – (default: width or 180) the width of image 110 only.

Examples
scroll

scroll

Note how in the above example, the parameter "width4=170" resets the width of image 4, to allow the dollar-bill to be shorter than the other images of George Washington. However, each specific image width could be set larger, to allow some images to be taller than all the others.