Template:ImageWithCaption: Difference between revisions

From Proteopedia
Jump to navigationJump to search
Angel Herraez (talk | contribs)
width should not be preset
Angel Herraez (talk | contribs)
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]]