Computing.Net > Forums > Web Development > Html Table

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Html Table

Reply to Message Icon

Name: johnshay
Date: September 3, 2004 at 10:19:50 Pacific
OS: win2k
Comment:

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?




Sponsored Link
Ads by Google

Response Number 1
Name: johnshay
Date: September 3, 2004 at 14:40:49 Pacific
Reply:

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%;">


0

Response Number 2
Name: syndikut
Date: September 5, 2004 at 07:01:26 Pacific
Reply:

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!


0

Response Number 3
Name: FBI Agent
Date: September 5, 2004 at 15:36:16 Pacific
Reply:

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


0

Response Number 4
Name: syndikut
Date: September 5, 2004 at 20:51:23 Pacific
Reply:

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


0

Response Number 5
Name: syndikut
Date: September 5, 2004 at 21:14:58 Pacific
Reply:

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!



0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Html Table

html table from windows dir content www.computing.net/answers/webdevel/html-table-from-windows-dir-content/1260.html

HTML Tables www.computing.net/answers/webdevel/html-tables/1158.html

html table out of db table using CF www.computing.net/answers/webdevel/html-table-out-of-db-table-using-cf/3303.html