How to center Images in Description

TappedOut forum

Posted on Nov. 9, 2020, 2:45 p.m. by Amoskeag

Hello! I am trying to display cards of my deck in the description side by side (like two card combos, etc.) I can get them to display but they are formatted to the left of the page, the center tag doesn't seem to change anything

MagicMarc says... #2

It depends on your text code. Normally, just a center tag is sufficient. If that tag is not being applied there may be something in you image link overriding the tag. Or another instruction after the center tag but before the image tag?

November 9, 2020 3:28 p.m.

MagicMarc says... #3

Some good news and some bad news. The center tag works. So there is just an issue with your text between the center command and the image commands.

The Bad news is I can only get 1 picture in a "row". The editor automatically puts the 2nd image in a new row below it. Maybe sizing the images will fix that.

Here is a link to a deck copy of your deck where the center tag is working: Engineer's Toolbox copy

Maybe someone else on the site knows a way to present them side by side or if you can use a table within the body of the text to present them that way.

November 9, 2020 4:16 p.m.

MagicMarc says... #4

Good News!

A nested table works! Check out the deck link: Engineer's Toolbox copy.

You need to nest a table in the html of the deck description. Nothing fancy just a basic table row with object links.

Using a nested table:


Jester's Scepter Jester's Scepter
Jester's Scepter Jester's Scepter
November 9, 2020 4:29 p.m.

Amoskeag says... #5

Thanks for the help!

November 10, 2020 10:45 p.m.

multimedia says... #6

Use CSS in HTML with the style attribute to align the images next to each other.

<div style="text-align:center;">
<img src="" style="display:inline-block;" />
<img src="" style="display:inline-block;" />
</div>

CSS can be used in deck descriptions via an external stylesheet in HTML with LINK tag or inline style attribute. The above example is using inline CSS. display:inline-block is used to align elements, in this case images, next to each other. By wrapping the images in a DIV then you can center any content, in this case, images inside the div with text-align:center.

November 11, 2020 4:15 a.m. Edited.

Please login to comment