Forum Moderators: open
<table width="100%">
<tr>
<td valign="top">
this is some text on a white bg.<br>
<div style="height: 100%; background-color: #0000FF;">
this is some text on a blue background.
</div>
</td>
<td valign="top">
a lot of content goes here... so much that i won't even write it, but just imagine enough content that this TD will be taller than the first TD.
</td>
</tr>
</table>
Now, the problem is that the blue div stops as soon as the content within it stops. I need to find a way to get it to fill the entire height of the TD that contains it.
For most browsers, setting the TABLE tag with height: 0%; seems to do it - but not for Safari on Mac (which is a browser that I'm trying to design for). I also thought that it may have to do with the second, taller TD being drawn after the height was determined for the DIV. I wrote a simple script to set the height of the DIV to 100% after everything had loaded - but saw the same problem.
Thanks for taking the time to read this, and hopefully someone will be able to point out whatever I'm missing.
[/code]
And to be a little more specific, I need to set a top and right border on the blue div, so I can't just make the TD blue with borders and use a white div at the top (because the white div wouldn't overlap the border of the TD).