Hi,
Maybe you have tried so hard to create a HTML table with 100% width and height in Dreamweaver but anytime you tried you have seen that width of the table is 100% but not the height!!
If you try to write this simple HTML file with notepad yourself you see that it’s easy and you did it! and every thing works just fine… but when you create a new HTML file in Dreamweaver and try to make your table 100% you have a problem!
So what ‘s the problem? well, when you create a new HTML file via Dreamweaver, if you take a look at your code you see that you didn’t simply start with HTML tag! you see a tag in the first line like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The problem is this little line!! I myself don’t know why(be happy to know the reason) but it’s the problem! it prevents table to be 100% in height for an unknown reason!
If you delete this line and check your HTML file, you see that your table is 100% and everything is just fine.
Here is a simple example:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>100% HTML table</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#00FFFF">Hello!</td>
</tr>
</table>
</body>
</html>
