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
2010-09-27 03:07:44
I think you mean :, not =.
yc
2010-09-27 03:09:31
Correct :) fixed!
timothyclifford
2010-09-27 03:15:14