By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,765 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,765 IT Pros & Developers. It's quick & easy.

Height: 100% for div inside td on IE6

P: n/a
Hi
I'm having some trouble getting IE6 to honour percentage heights. The
effect I'm expecting from the code below is that the darker background
in the left-hand cell will fill the table cell (bar the padding).
However, the size of the cell seems to be dictated by the quantity of
text. What am I doing wrong ?

Mozilla/Firebird seem to render this in the way I expect.

Thanks
Andy

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Height test</title>
<style>
.tab {width: 200px}
.cell {background-color: #eeeeee; padding: 5px; vertical-align:
top}
.full {height: 100%; background-color: #dddddd; font: xx-small
sans-serif}
.pic {width: 85px; height: 110px}
</style>
</head>
<body>
<table class='tab'>
<tr>

<td class='cell'>
<div class='full'>
This is text which fails to fill this cell
</div>
</td>

<td class='cell'>
<img class='pic' src='img0.jpg'>
</td>
</tr>

</table>
</body>
</html>
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.