html - Placing a png image in a table -


hi know simple question. unable it. want place images in table. working fine in new html file. when trying insert table in project file, images getting overlapped.they not fitting in table. mistake doing? kindly @ image attached.

table,td,th {border: 3px solid black;padding: 15px}
<table>        <tr><th>choose icons</th></tr>        <tr><td ><img src='http://www.freeiconspng.com/uploads/smiley-icon-1.png' width='20%'/></td></tr>        <tr><td ><img src='http://www.freeiconspng.com/uploads/smiley-icon-1.png'width=20%/></td></tr>        </table>

enter image description here

try:

table,  td,  th {    border: 3px solid black;    padding: 15px  }  img.icon {    width: 20%;    height: auto;  }
<table>    <tr>      <th>choose icons</th>    </tr>    <tr>      <td>        <img src='heart1.png' class="icon" />      </td>    </tr>    <tr>      <td>        <img src='heart1.png' class="icon" />      </td>    </tr>  </table>


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -