简体   繁体   中英

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.

在此处输入图片说明

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM