Difference between revisions of "Template:Double image"
(these tags haven't been whitelisted) |
(div.tright and div.tleft have an undesirably thick border in Monobook) |
||
Line 1: | Line 1: | ||
<noinclude>{{Wikipedia}} | <noinclude>{{Wikipedia}} | ||
</noinclude><includeonly>{{#switch: {{{1|}}} <!-- first parameter inserts a <div> with a left, right or central float --> | </noinclude><includeonly>{{#switch: {{{1|}}} <!-- first parameter inserts a <div> with a left, right or central float --> | ||
− | | left = <div class="article-thumb tleft"> | + | | left = <div class="article-thumb tleft" style="border-width: 1px;"> |
− | | right = <div class="article-thumb tright"> | + | | right = <div class="article-thumb tright" style="border-width: 1px;"> |
| center = <div class="center"><div class="article-thumb tnone"> | | center = <div class="center"><div class="article-thumb tnone"> | ||
− | | #default = <div class="article-thumb tright"> | + | | #default = <div class="article-thumb tright" style="border-width: 1px;"> |
}}<div class="image image-thumbnail" style="width:{{#expr: {{{3|0}}} + {{{5|0}}} + 8}}px;"> <!-- calculate width based on image widths +8px --> | }}<div class="image image-thumbnail" style="width:{{#expr: {{{3|0}}} + {{{5|0}}} + 8}}px;"> <!-- calculate width based on image widths +8px --> | ||
{| style="background: transparent; border: 0; padding: 0; margin: 0; width:{{#expr: {{{3|0}}} + {{{5|0}}} + 4}}px;" cellspacing="0" | {| style="background: transparent; border: 0; padding: 0; margin: 0; width:{{#expr: {{{3|0}}} + {{{5|0}}} + 4}}px;" cellspacing="0" |
Revision as of 00:08, 14 March 2016
This template uses Creative Commons licensed content from Wikipedia's Template:Double image template.
The list of authors can be seen in the page history there. See Wikipedia's copyrights page for more information. |
Usage
This template creates a box with two images side by side. It needs parameters like this:
{{double image|left/right/center|Left image|Left image size|Right image|Right image size|Left caption|Right caption|Left alt text|Right alt text}}
or
{{double image |1=left/right/center |2=Left image |3=Left image size |4=Right image |5=Right image size |6=Left caption |7=Right caption (leave blank to combine) |8=Left image alt text |9=Right image alt text }}
See wikipedia:WP:ALT for advice about alt text.
Examples
To the right, with one single caption:
{{double image|right|Yellow card.svg|60|Red card.svg|60|Players are cautioned ... round.||Yellow cartouche|Red cartouche}}
To the left. With two captions, one beneath each image:
{{double image|left|Yellow card.svg|60|Red card.svg|60|Yellow|Red|Yellow cartouche|Red cartouche}}
See also
- {{Multiple image}}
- {{Triple image}}