PDA

Click to See Complete Forum and Search --> : Table height confusing...


Apek
Mar 2nd, 2005, 01:04 AM
Below is my HTML code:

When i view in browser, the height of the table is not full,not 100%,even i have set the height to 100%.I want this page is suit for 800x600 and 1024x768 resolution.
But the weird is when the page is in design mode(in Dreamweaver or Frontpage), the table height is 100%.
How to fix this??


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>IT Booking</title>
<script language="vbscript">


</script>
<style type="text/css">
<!--
.style1 {
font-family: Arial;
color: #FFFFFF;
font-size: 10px;
}
-->
</style>
</head>
<body>

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="10%" bgcolor="#376EBF">&nbsp;</td>
</tr>
<tr>
<td height="20%" align="left" valign="bottom" bgcolor="#69A5FF"><span class="style1">METAL PARTS PLANT </span></td>
</tr>
<tr>
<td bgcolor="#428CFB" height="40%">
<table border="0" cellspacing="0" width="100%" id="AutoNumber3" cellpadding="5">
<tr>
<td width="100%">
<div align="right">
<form name="testuser" method="post" action="checkuser.asp">
<table border="0" cellspacing="0" width="300" id="AutoNumber4" cellpadding="3">
<tr>
<td width="101">
<span style="font-family: Arial">
<font style="font-size: 9pt" color="#D2E9FF">User Name : </font></span></td>
<td width="187">
<input type="text" name="user" size="27" tabindex="1"></td>

</tr>
<tr>
<td width="101">
<span style="font-family: Arial">
<font style="font-size: 9pt" color="#D2E9FF">Password : </font></span></td>
<td width="187">
<input type="password" name="txtPwd" size="27" tabindex="2"></td>
</tr>
<tr>
<td width="294" colspan="2">
<p align="right"><img src="button/login.gif" width="77" height="15" border="0" onClick="login()"></td>
</tr>

</table>
</form>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#69A5FF" height="20%">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#376EBF" height="10%">&nbsp;</td>
</tr>
</table>

</body>
</html>

mendhak
Mar 2nd, 2005, 01:17 AM
It's invalid code.

Read this, nice article:

http://www.apptools.com/examples/tableheight.php

Apek
Mar 2nd, 2005, 01:48 AM
wrong code?
but it was generated by Dreamweaver..so Dreamweaver generate wrong code?Pheww...

mendhak
Mar 2nd, 2005, 03:02 AM
Yes, dreamweaver generated wrong code. Use notepad instead. :D