Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a web page with all body margins set to 0.
The table has border=0, cellpadding=0, cellspacing=0, height=100%, width=100%.
When the page is loaded first everything is fine. However, if I navigate away from the page and then click BACK in IE, the table has shrunk leaving right and bottom margins of about 10 or 20 pixels. If I hit refresh, the table expands to fill the whole page again.
Go here to see:
http://www.showhouse.ie/test.htm
The page is 100% black as the table bgcolor is set to black.
Now click on the HOME icon in your browser and then click BACK to go back to my test page.
You will notice margins have appeared on the bottom and right of the page.
If you click refresh, the table expands again to fill the page.
Anyone know why this might be happening or have a fix for it?

This works:
<table style="margin-top:0;padding-top:0;margin-bottom:0;padding-bottom:0;margin-left:0;padding-left:0;margin-right:0;padding-left:0;height:100%;width:100%;">

hmm i would try this first - then add the table ;0)
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
</body>
</html>peace!

maybe it has something to do with that useless Div or something in the css (assuming you have one). try taking out the div and see if it works
FBI Agent
AIM: EliteAssassin187

Still having trouble?
right... this is your code in test.htm
<html>
<body bgcolor="#ffffff" height=100% width=100% leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><div align=center>
<table width="100%" height="100%" border=0 cellpadding=0 bgcolor=#000000 cellspacing=0><tr><td></td></tr>
</table>
</div>
</body>
</html>well you have height=100% width=100% in the body - not good!
copy and paste this:
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
</body>
</html>If that dont work - give in!! ;0)
l8rz

Sorry - ignore the example above its still not right use this instead ;0)
I guarantee you it will work.
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head><body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#0066FF" bgcolor="#000000">
<tr>
<td width="100%" height="100%" bordercolor="#0066FF"></td>
</tr>
</table>
</body>
</html>i've added rightmargin="0" & bottommargin="0"
You should see the blue border around the page edge.if you want it black change this:
bordercolor="#000000"sorry about the other one
sorted!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |