Template:ImageWithCaption
From Proteopedia
(Difference between revisions)
(a template to center an image with a caption below, all inside a frame) |
(documenting) |
||
(8 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
- | <div style="text-align:center; border:1px solid gray | + | <noinclude> |
- | [[Image:{{{1}}}|{{{ | + | 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);"> | ||
+ | [[Image:{{{1}}}|{{{2}}}px]] | ||
{{{3}}} | {{{3}}} | ||
</div> | </div> |
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}}}