html - img auto width height and max-height -


i have code here:

<table class="media imgtable" border="1" width="auto" height="auto" style=""><tbody> <tr><td class="xclick" width="auto" height="auto" align="left" valign="center">  <div class="xclick" style="position: relative; left: -1px; top: 3px; width: 200px; padding: 0px 1%; border: 1px solid silver; border-bottom: none; background-color: #add8e6;"><?php echo $label; ?></div>  </td></tr> <tr><td class="xclick" width="auto" height="auto" align="center" valign="center" style="position: relative;">  <img id="img" src="<?php echo $src; ?>" style="width: auto; height: auto;" />  </td></tr></tbody></table> 

and looks this

it perfect. want. images large , overflow screen (viewport)

so tried this:

<table border="1" width="auto" height="90%" style=""><tbody>     <tr><td class="xclick" width="100%" height="" align="left" valign="center">      <div class="xclick" style="position: relative; left: -1px; top: 3px; width: 200px; padding: 0px 1%; border: 1px solid silver; border-bottom: none; background-color: #add8e6;"><?php echo $label; ?></div>      </td></tr>     <tr><td class="xclick" width="100%" height="100%" align="center" valign="center" style="position: relative;">      <img id="img" src="<?php echo $src; ?>" style="position: absolute; top: 0px; left: 0px; width: auto; height: auto; max-height: 100%;" />      </td></tr></tbody></table> 

looks this

i want make img have auto width , height , max height. image wrapped td in first picture. images large , overflow viewport/screen;

is not sufficient?

display: block; max-width: 100%; height: auto; 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -