Forum Index > Wiki Tutorials > Thin galleries
Posted by User452 on 2012-04-25 02:17:00

A while ago, I was adding a lot of images and had a set of images which were taller when they were long, and as such sat strangely in the gallery frame.
When looking for a way to shrink the edges of the gallery, I discovered that it wasn't possible to independently specify the width and height values of gallery tags, you can only specify the width, and the height is automatically determined from a set ratio. I didn't give the problem any more thought until recently.

When I looked into the problem again, I discovered that galleries originally had both values, but that this functionality was sacrificed when the gallery GUI was created.

It was never explained why the height attribute couldn't just be omitted from the GUI and allowed to be manually set.

Anyway, I've created a workaround for the problem. This is mainly for galleries which are floated to the right of the text, and contain images of a regular shape.


{{gallery|type=float|class=thin|widths=400|style=width:250px !important;|{{#!:
Image1.png|Caption 1
Image2.jpg|Caption 2
}} }}
  • The "widths=400" is the normal width and automatically sets the height.
  • The "style=width:250px !important" resets the width to be thinner, without effecting the height.

452 - 2012-04-25 02:17:00

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.