Template:ImageLink: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (attempt a layout fix for an issue some people are having)
No edit summary
Line 2: Line 2:
<div style="display: flex; justify-content: center; align-items: center; width: {{{w|100}}}px; height: {{{h|100}}}px;"
<div style="display: flex; justify-content: center; align-items: center; width: {{{w|100}}}px; height: {{{h|100}}}px;"
>[[File:{{{1}}}|{{{w|100}}}x{{{h|100}}}px|{{{3|{{{2}}}}}}|link={{{2}}}]]</div>
>[[File:{{{1}}}|{{{w|100}}}x{{{h|100}}}px|{{{3|{{{2}}}}}}|link={{{2}}}]]</div>
<div style="width: {{{w|100}}}px; text-align: center; overflow: hidden;"
<div style="width: {{{w|100}}}px; text-align: center;"
>[[{{{2}}}|{{{3|{{{2}}}}}}]]</div>
>[[{{{2}}}|{{{3|{{{2}}}}}}]]</div>
</div></includeonly><noinclude>
</div></includeonly><noinclude>

Revision as of 23:05, 30 July 2023

This template allows you to add images on top of links.

The element will be an inline block, meaning several can appear in one line. You can give them all a specific width and height to get a nice consistent layout.


Standard width/height is 100:

{{ImageLink|Frenzy Icon.png|Origins}}
{{ImageLink|Defensive Duellist Icon.png|Character Creation#Backgrounds|Backgrounds}}
{{ImageLink|Passive Feature Generic Icon.png|Feats|Just a test with very very long text}}

Result:

Origins
Backgrounds
Just a test with very very long title text

Limiting width only; note this may cause the text to clip as seen here:

{{ImageLink|Frenzy Icon.png|Origins|w=50}}
{{ImageLink|Defensive Duellist Icon.png|Character Creation#Backgrounds|Backgrounds|w=50}}

Result:

Origins
Backgrounds

Limiting height only:

{{ImageLink|Frenzy Icon.png|Origins|h=50}}
{{ImageLink|Defensive Duellist Icon.png|Character Creation#Backgrounds|Backgrounds|h=50}}

Result:

Origins
Backgrounds

Limiting width and height:

{{ImageLink|Frenzy Icon.png|Origins|w=50|h=50}}
{{ImageLink|Defensive Duellist Icon.png|Character Creation#Backgrounds|Backgrounds|w=50|h=50}}

Result:

Origins
Backgrounds