tags:

views:

31

answers:

1

Can we somehow set up height:50% for a div that is situated inside a container (preferebly a table cell) the dimensions of which we do not know and they may change a lot dinamically.

A: 

You can set up height for a div however parent elements must have their height set explicitly also. For example:

<html>
<head>
</head>
  <body style="height:100%">
    <table style="height:100%">
      <tr>
        <td style="height:100%">
          <div style="height:50%">
          </div>
        </td>
      </tr>
    </table>
  </body>
</html>

So doesn't matter that container height changes dynamically, so long as it is set. There's other methods, this is probably the simplest.

timothyclifford
I think you mean :, not =.
yc
Correct :) fixed!
timothyclifford