Help talk:Gallery tag

Latest comment: 1 month ago by GhostInTheMachine in topic Centred caption?

Improvement?

edit

hi, traditional is a nice display:

  • could an option being added to have hover & overlay option with it ?
  • when a link= is set is there an option to open it in new windows ?

thanks for the good work ! ^_^

Frogg - 2015/04/24 11:29 Gmt+1 — Preceding unsigned comment added by 81.57.18.192 (talk) 09:30, 24 April 2015

Display problem

edit

The width of the <div class=thumb> is usually just one device pixel wider than the image it contains, which makes a vertical line appear in the colour set by this bit of CSS:

#content .gallerybox div.thumb {
  background-color: #f8f9fa;
}

I'm not sure what the use of that is. I think it's only intended to show up for transparent images, but wouldn't you want the overall page background to appear in that case? A transparent image in a gallery is likely to be a graph or an object with the background cut out, so if the background is off-white, wouldn't you use that?

To get back to why this is a problem... Although normally the line of pixels isn't that noticeable since it's very close in colour to the white page background, it does become very distracting if for some reason a custom background colour has been set on either the gallery tag itself or its parent element.

Can a caption be placed under a gallery?

edit

Is it possible to change the position of the caption in a gallery? This page doesn't explain whether this is possible. Jarble (talk) 20:11, 12 September 2023 (UTC)Reply

Can this caption be placed below the gallery?
@Jarble: Yes, using {{multiple image}}, see above. --Redrose64 🌹 (talk) 23:05, 12 September 2023 (UTC)Reply
{{Image frame}} appears to work also:
Can this caption be placed below the gallery?

— Preceding unsigned comment added by Jarble (talkcontribs) 00:05, 13 September 2023 (UTC)Reply

Adjusting margins between images

edit

Unlike {{Multiple images}}, galleries in "packed" mode leave empty spaces between the images. Is it possible to display these images in a gallery tag without spaces between them? Jarble (talk) 16:04, 21 September 2023 (UTC)Reply

Apparently not – there's a minimum width of 60px in the code, here: [1]. I would suggest making the gallery taller to meet this minimum width. Matma Rex talk 20:36, 26 October 2023 (UTC)Reply

Centred caption?

edit

In the first example under Extended syntax, the set of images is aligned left with the caption above. However, the caption is centred within the page, not centred within the set of images. The same for a packed gallery: the gallery can be aligned left via style="text-align:left", but the caption remains centred within the page. I could enclose the gallery in a one-cell table which does constrain the caption, but that hurts. Is there any clean way to adjust the caption to be over the centre of the gallery? — GhostInTheMachine talk to me 14:23, 26 May 2024 (UTC)Reply