Template:Figure: Difference between revisions

From Wikisource
Jump to navigation Jump to search
Content deleted Content added
Trying to remove extra empty paragraph when there is no caption.
Avoid page breaks between image and caption
Line 1: Line 1:
<div style="{{ #ifeq: {{{position|}}} | absolute | position:absolute; left:{{{figureleft|0px}}}; top:{{{figuretop|0px}}}; | position:relative; {{ #ifeq: {{{position|}}} | center | margin:0 auto; | float:{{{position|left}}}; }} }} width:{{{width|400px}}}; padding:{{{padding|0}}};">
<div style="{{ #ifeq: {{{position|}}} | absolute | position:absolute; left:{{{figureleft|0px}}}; top:{{{figuretop|0px}}}; | position:relative; {{ #ifeq: {{{position|}}} | center | margin:0 auto; | float:{{{position|left}}}; }} }} width:{{{width|400px}}}; padding:{{{padding|0}}}; page-break-inside:avoid;">
{{ #if: {{{topcaption|}}} | {{{topcaption}}} }}
{{ #if: {{{topcaption|}}} | {{{topcaption}}} }}
[[File:{{{image|cross.svg}}}|{{{width|400px}}}|{{{alt|{{{image|cross.svg}}}}}}]]
[[File:{{{image|cross.svg}}}|{{{width|400px}}}|{{{alt|{{{image|cross.svg}}}}}}]]

Revision as of 18:54, 16 March 2021

cross.svg