Template:ImageWithCaption
From Proteopedia
(Difference between revisions)
(width should not be preset) |
(documenting) |
||
Line 1: | Line 1: | ||
+ | <noinclude> | ||
+ | Positions to the center an image with its caption below it, both surrounded with a line; text outside does not flow around. | ||
+ | 1st parameter: image filename in the wiki. | ||
+ | 2nd parameter: width (size) in pixels. | ||
+ | 3rd parameter: the caption text. | ||
+ | |||
+ | Use: | ||
+ | <nowiki>{{ImageWithCaption|SomeImage.jpg|400|Some caption.}}</nowiki> | ||
+ | |||
+ | See also: [[Template:ImageWithCaptionRight]] | ||
+ | </noinclude> | ||
<div style="text-align:center; border:1px solid gray; display:table; margin:0 auto; padding:2px 8px; width:calc({{{2}}}px + 2px);"> | <div style="text-align:center; border:1px solid gray; display:table; margin:0 auto; padding:2px 8px; width:calc({{{2}}}px + 2px);"> | ||
[[Image:{{{1}}}|{{{2}}}px]] | [[Image:{{{1}}}|{{{2}}}px]] |
Current revision
Positions to the center an image with its caption below it, both surrounded with a line; text outside does not flow around. 1st parameter: image filename in the wiki. 2nd parameter: width (size) in pixels. 3rd parameter: the caption text.
Use:
{{ImageWithCaption|SomeImage.jpg|400|Some caption.}}
See also: Template:ImageWithCaptionRight
[[Image:{{{1}}}|{{{2}}}px]]
{{{3}}}