HTML Element Style How to - Add 100% height div inside table td








Question

We would like to know how to add 100% height div inside table td.

Answer


<!DOCTYPE html>
<html>
<head>
</head><!--from w ww .j  ava  2  s  . c om-->
<body>
  <table border="1">
    <tr>
      <td style="vertical-align: top; background-color: yellow;"><div>Some
          Content</div></td>
      <td>Some Content<br>
      <br>
      <br>
      <br></td>
    </tr>
  </table>
</body>
</html>

The code above is rendered as follows: