Template:Multiple image: Difference between revisions

adjust margin widths
(edit max)
(adjust margin widths)
Line 1: Line 1:
{{#if:{{{image1|}}}{{{image2|}}}{{{image3|}}}{{{image4|}}}{{{image5|}}}{{{image6|}}}{{{image7|}}}{{{image8|}}}{{{image9|}}}{{{image10|}}}|<div class="thumb {{#switch: {{{align|}}} | left = tleft | center|centre = tnone | right|#default = tright}}" style="position: relative; z-index: 100; width: {{#switch:{{{direction|}}}<!--
{{#if:{{{image1|}}}{{{image2|}}}{{{image3|}}}{{{image4|}}}{{{image5|}}}{{{image6|}}}{{{image7|}}}{{{image8|}}}{{{image9|}}}{{{image10|}}}|<div class="thumb {{#switch: {{{align|}}} | left = tleft | center|centre = tnone | right|#default = tright}}" style="position: relative; z-index: 100; width: {{#switch:{{{direction|}}}<!--
If stacked vertically, box width = largest width + 12 px (6 px margin on left and right) -->
If stacked vertically, box width = largest width + 14 px (7 px margin on left and right) -->
| vertical              = {{#expr:
| vertical              = {{#expr:
     {{#if:{{{width|}}}
     {{#if:{{{width|}}}
Line 6: Line 6:
       | {{Max/12 | {{{width1|200}}} | {{{width2|}}} | {{{width3|}}} | {{{width4|}}} | {{{width5|}}} | {{{width6|}}} | {{{width7|}}} | {{{width8|}}} | {{{width9|}}} | {{{width10|}}} | 0 }}
       | {{Max/12 | {{{width1|200}}} | {{{width2|}}} | {{{width3|}}} | {{{width4|}}} | {{{width5|}}} | {{{width6|}}} | {{{width7|}}} | {{{width8|}}} | {{{width9|}}} | {{{width10|}}} | 0 }}
     }}
     }}
     + 12
     + 14
   }}
   }}
| horizontal | #default  = {{#if:{{{width|}}}<!--
| horizontal | #default  = {{#if:{{{width|}}}<!--
   If stacked horizontally and a single common width was passed for use in all images,
   If stacked horizontally and a single common width was passed for use in all images,
   box width = (common width + 4px) * number of images + 8.
   box width = (common width + 4px) * number of images + 10.
   This creates a 4px margin between the images, and a 6px margin on each side -->
   This creates a 4px margin between the images, and a 9px margin on each side -->
   |{{#expr:
   |{{#expr:
       ({{{width}}}+4)
       ({{{width}}}+4)
Line 17: Line 17:
       {{Template:Multiple image/numImgs | {{{image1|}}} | {{{image2|}}} | {{{image3|}}} | {{{image4|}}} | {{{image5|}}} | {{{image6|}}} | {{{image7|}}} | {{{image8|}}} | {{{image9|}}} | {{{image10|}}} }}
       {{Template:Multiple image/numImgs | {{{image1|}}} | {{{image2|}}} | {{{image3|}}} | {{{image4|}}} | {{{image5|}}} | {{{image6|}}} | {{{image7|}}} | {{{image8|}}} | {{{image9|}}} | {{{image10|}}} }}
       +
       +
       8
       10
       }}<!--
       }}<!--
   If stacked horizontally and a custom width was passed for each image,
   If stacked horizontally and a custom width was passed for each image,
90,866

edits