Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Funny Bug Fix

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR
Hello,

Sometimes, for an unknown reason, refreshing your page
on IE5 Mac will make the layout ignore the body margins
that were set to 0. You just see a large space on top and
left.

I discovered that inserting this:

<SCRIPT LANGUAGE=&quot;JavaScript1.2&quot;>
<!--
// End -->
</SCRIPT>

above the body tag will fix the problem! (if you already
have a javascript in the page the bug won't show up)
Funny, isn't it?

My Work...
...and More...
 
OK.
Go to and refresh the page several times on IE5 MAC.
Then, go to and do the same.

First page:

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2//EN&quot;>
<html>
<head>
<title></title>
</head>
<body background=&quot;bg_left.gif&quot; topmargin=&quot;0&quot; leftmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
<img src=&quot;logo.gif&quot; width=&quot;122&quot; height=&quot;58&quot; alt=&quot;&quot; border=&quot;0&quot;>
</body>
</html>

Second page:

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2//EN&quot;>
<html>
<head>
<title></title>
</head>
<SCRIPT LANGUAGE=&quot;JavaScript1.2&quot;>
<!--
// End -->
</SCRIPT>
<body background=&quot;bg_left.gif&quot; topmargin=&quot;0&quot; leftmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
<img src=&quot;logo.gif&quot; width=&quot;122&quot; height=&quot;58&quot; alt=&quot;&quot; border=&quot;0&quot;>
</body>
</html>


Tell me what you think.


My Work...
...and More...
 
I don't have IE5 but topmargin and leftmargin are not standard to HTML3.2 (it is an IE only feature) so that could be part of what causes the bug. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top