Nico Schlömer
Nico Schlömer

Reputation: 58761

table with images of same relative size in github markdown

In GitHub's markdown, I have a table with one row and two columns, each containing an <img/>. Without any width specification, the right of the two images is far larger than the left.

enter image description here

I would like to make sure the two images have the same width, but I don't want to specify the absolute size to avoid display issues on small screens. I'd love

<img src="img1.png" width="45%"/> | <img src="img2.png" width="45%"/>                                                          
:----:|:----:|                                                                        

but apparently the 45% is now relative to the width of the column, not the page.

n

Any hints?

Upvotes: 2

Views: 1679

Answers (1)

Nico Schl&#246;mer
Nico Schl&#246;mer

Reputation: 58761

Markdown extends HTML, so one can simply use HTML tables:

<table width="100%">
  <tr>
  <td width="50%"></td>
  <td width="50%"></td>
  </tr>
</table>

Upvotes: 3

Related Questions