Dave
April 23, 2006, 12:22pm
1
Hey guys,
Just playing with dreamweaver 8. When i create a table 100% width and height with a background colour of pink for example it doesn’t render properly on Internet explorer. You only see a single row in pink, you dont see the whole page in pink. If I add a background image, you don’t see it at all.
If I remove the code on the first 2 lines, the DTD, then it works fine.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</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" cellpadding="0" cellspacing="0" bgcolor="#003366">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
Dave
April 23, 2006, 11:13pm
2
This is what you get if you don’t remove the DTD tag on the first 2 lines of the 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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</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" cellpadding="0" cellspacing="0" bgcolor="#003366">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
soulty
April 24, 2006, 3:30am
3
use css and a div. Only issue with that is if you want to vertically align the content you would need to find the css hack/work around.
css//
body{
padding: 0 0 0 0;
margin: 0 0 0 0;
}
#wrapper {
margin:0 auto;
width:?px;
}
//
html//
<body>
<div id=“wrapper”>
insert content here…
</div>
</body>