You are here: IE ignores table cell height propery - why? « HTML « IT news, forums, messages
IE ignores table cell height propery - why?

Posted by Andrey Tarasevich on 10/14/08 11:23

Hello

This is probably something simple, but I can't seem to find an answer. Consider
the following code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html style="width: 100%; height: 100%">
<body style="width: 100%; height: 100%">
<table style="width: 100%; height: 100%">
<tr><td style="height: 20px; border: 1px solid black"><p>1</p></td></tr>
<tr><td><p>2</p></td></tr>
<tr><td style="height: 20px; border: 1px solid black"><p>3</p></td></tr>
</table>
</body>
</html>

I want the first and the last row to have explicitly specified height and the
middle row to occupy the rest of the entire table height. The problem is that IE
6 is ignoring the 'height' specification for the first and the last rows' cells.
Every row in IE appears take exactly 1/3 of the table's height.

MS FrontPage's user interface ('Style' dialog) seems to suggest that in order to
use 'height' property I also have to specify a 'position' property (is this the
case?). Anyway, adding, say, 'position: relative' to the above 'td' styles
doesn't change anything.

Mozilla, on the other hand, seems to do what I expect it to do.

Am I doing something wrong? If that's the case, what's the right way to achieve
the required distribution of row heights?

--
Best regards,
Andrey Tarasevich

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация