-1

I have a table that is of a responsive height and would like the image within it to fit the height of the td, but instead it overflows to the image source height, I have spent hours on this and no luck yet. The basic test case:

         <table style='height:50%;width:50%;'>
            <tr>
              <td>
                <img style='height:100%;' src='https://placehold.it/192x1200'>
              </td>
            </tr>
            <tr>
              <td>
                bob
              </td>
            </tr>
         </table>
Malooii
  • 1
  • 4
  • Have a look here. It is build up different, but it does address a similar issue wit the sizing of the image. https://stackoverflow.com/questions/14262938/child-with-max-height-100-overflows-parent/14264093#14264093 – Daniel Apr 24 '18 at 15:14

1 Answers1

0

use position relative to the parent of the image [ td ] and will apply your dimensions by precentage.