Web Hosting Talk







View Full Version : Another bug in M$IE ?


BurakUeda
08-27-2006, 07:37 AM
This is the first time I am getting this. Check out these two sample pages in MSIE:

http://takezaki-pharmacy.com/test1.php
http://takezaki-pharmacy.com/test2.php

if you look at the source code they are identical, but in test2.php MSIE puts some additional space on top.

The difference between two pages is:
test1.php:...snip...

<body>
<div>
<img src="/images/smiling_woman.jpg" width="225" height="201" />
</div>
</body>

...snip...

test2.php:...snip...

<body>
<?php
include "test2include.php";
?>
</body>

...snip...
If I include the file, MSIE adds 15-16 pixels top margin.
Is this already a known problem?

BurakUeda
08-27-2006, 08:19 AM
Sorry, I forgot to remove authentication.
Now you can access those 2 pages.

Aradorn
08-27-2006, 08:49 AM
test2 shows a character to me just before the opening div.

sea otter
08-27-2006, 09:24 AM
test2 shows a character to me just before the opening div.

Yup, me too. Any my guess is that (having done this myself often enough), the OP saved the page as unicode but with the byte-order marker (BOM).

Most (good) code editors give you a way to save unicode files with or without the BOM. Reopen the file, and then resave it without the BOM.

Or, go to the bomstrip site (http://www.xs4all.nl/~mechiel/projects/bomstrip/) where you can find a small program to do the job for you.

Note that if you include files via the PHP include directive, the BOM might be in one of those, so it's best to just run all your sourcefiles through the stripper.

BurakUeda
08-27-2006, 09:32 AM
Dang!

That was it. Thanks a bunch guys.
Somehow, I must have been checked the "Include BOM" mistakenly in dreamweaver.