You are here: Table height issue in IE7 « HTML « IT news, forums, messages
Table height issue in IE7

Posted by leodippolito on 02/12/07 15:38

Hi there,

I have this code:

---

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Test</title>

<style type="text/css">
html, body
{
margin: 0;
padding: 0;
border: 0;
height: 100%;
width: 100%;
}
</style>

</head>
<body>

<table id="mainTable" cellpadding="0" cellspacing="0"
style="height: 100%; width: 100%;">

<tr id="header" style="height: 60px;">
<td style="background-color: yellow;">header</td>
</tr>

<tr id="contents" style="height: 100%;">
<td style="background-color: red;">contents</td>
</tr>

<tr id="footer" style="height: 60px;">
<td style="background-color: blue;">footer</td>
</tr>

</table>

</body>
</html>

---

It works fine in Firefox (I have a table with the maximum screen
height and no scrollbars).

In IE7 I get a vertical scrollbar and the table looks larger (in
height) than it should be.

I don't understand.... What am I doing wrong?

How can I have the same Firefox appearence in IE7?

Thanks!

 

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

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