My webpage layout displayed abnormally in IE

Z

Zifre

When viewed locally on my computer, the page layout is what i wanted.
However, after i uploaded the site to server, IE (v9.0) did not
display the online page correctly: menu bar are missing, and the page
is not centered. It's displayed correctly in Chrome 14.0. The web page
I'm talking about is: www.pribolabs.webs.com. I tried to validate the
page and get the following error:
" Line 2: Start tag expected, '<' not found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml1…" But there I do have '<' at the beginning of doctype
declaration.
Can anyone interested help me take a look at the problem?
 
B

BootNic

When viewed locally on my computer, the page layout is what i wanted.
However, after i uploaded the site to server, IE (v9.0) did not
display the online page correctly: menu bar are missing, and the page
is not centered. It's displayed correctly in Chrome 14.0. The web page
I'm talking about is: www.pribolabs.webs.com. I tried to validate the
page and get the following error:
" Line 2: Start tag expected, '<' not found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3..org/
TR/xhtml1…" But there I do have '<' at the beginning of doctype
declaration.
Can anyone interested help me take a look at the problem?

Try to save the page WITHOUT BOM

non white-space characters before the doctype may trigger quirks mode.

For IE 8/9 setting X-UA-Compatible header or meta may resolve the issue.

PHP => header("X-UA-Compatible: IE=edge");
apache2 => Header set X-UA-Compatible "IE=edge"
meta => <meta http-equiv="X-UA-Compatible" content="IE=edge">

--
BootNic Sun Jul 31, 2011 01:03 am
When men are pure, laws are useless; when men are corrupt, laws are broken.
*Benjamin Disraeli*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk404g0ACgkQmo2774GZ7qliiwCfZfI2hhU7QUHehC51lHQnL+Jf
B9IAoLem21m8NC2zswn089OylSb3kzx0
=6zLq
-----END PGP SIGNATURE-----
 
S

Sjeef

Zifre said:
When viewed locally on my computer, the page layout is what i wanted.
However, after i uploaded the site to server, IE (v9.0) did not
display the online page correctly: menu bar are missing, and the page
is not centered. It's displayed correctly in Chrome 14.0. The web page
I'm talking about is: www.pribolabs.webs.com. I tried to validate the
page and get the following error:
" Line 2: Start tag expected, '<' not found
?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml1." But there I do have '<' at the beginning of doctype
declaration.
Can anyone interested help me take a look at the problem?

Get rid of the first 'empty' line and start with the Doctype.
Use W3C to see what is wrong with the code.
You find W3C at: http://validator.w3.org/

--
Regards,

Gerard Schaefers

Website: http://www.sjeef.eu

' Vergeten' groenten? Nieuwe rubriek:
http://www.sjeef.eu/Nederlands/Recepten/Groenten/00groenten.html
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Zifre <[email protected]>
writing in (e-mail address removed):
When viewed locally on my computer, the page layout is what i wanted.
However, after i uploaded the site to server, IE (v9.0) did not
display the online page correctly: menu bar are missing, and the page
is not centered. It's displayed correctly in Chrome 14.0. The web page
I'm talking about is: www.pribolabs.webs.com. I tried to validate the
page and get the following error:
" Line 2: Start tag expected, '<' not found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml1…" But there I do have '<' at the beginning of doctype
declaration.
Can anyone interested help me take a look at the problem?

You are hosting at webs.com, I assume using a free account? Looks like
they are injecting javascript into the last lines on the page, and that
is probably causing the problem.

Did you validate the page from your local computer? You can copy and
paste the page to the validator at <http://validator.w3.org/>.

If the page validates on your system, it is probably the hosting company
that is making the page fail. I suggest another host.
 
S

se

"Zifre" <[email protected]> skrev i meddelelsen
When viewed locally on my computer, the page layout is what i wanted.
However, after i uploaded the site to server, IE (v9.0) did not
display the online page correctly: menu bar are missing, and the page
is not centered. It's displayed correctly in Chrome 14.0. The web page
I'm talking about is: www.pribolabs.webs.com. I tried to validate the
page and get the following error:
" Line 2: Start tag expected, '<' not found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/
TR/xhtml1…" But there I do have '<' at the beginning of doctype
declaration.
Can anyone interested help me take a look at the problem?

You doctype declaration is not correct. xml:lang="en"
is not the full part. The full declaration of this part looks like:
xml:lang="en" lang="en"
You're missing: lang="en"
As you have a meta encoding="UTF-8?"
then the first line "<?xml version="1.1" encoding="UTF-8"?>"
of above can be excluded.


<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

/se
 
J

Jukka K. Korpela

Try to save the page WITHOUT BOM

That's a good guess, but a wrong one, as other guesses in this
discussion. The OP had used the W3C Markup Validator, which did not say
anything about BOM - it recognizes BOM in UTF-8 and warns that it may
cause problems in browsers (which is over-cautious - you need to go back
to something like Netscape 3 to find a BOM-challenged browser). But it
does not say so about this page, and the page apparently has no BOM.

It's a bit difficult to see what the page really starts with, but
http://www.rexswain.com/httpview.html
gives the following hex dump of the start:

6133380D0A0AEFBB BF3C21444F435459 a38••••• •<!DOCTY

This means that the data starts with the three characters a38 followed
by malformed garbage. The next byte is 80, violation UTF-8 requirements
(such a byte can only appear as a 2nd, 3rd, or 4th byte of a multibyte
representation of a character).

So something needs to be fixed on the server. This really isn't an HTML
issue, as the data violates the low-level UTF-8 rules, i.e. it is
malformed as character data. Browsers do some kludgy things that might
be described as error recovery, but probably the three characters a38
are sufficient for throwing IE to quirks mode.
 
B

BootNic

That's a good guess, but a wrong one,

It is not a guess, a BOM is present, not where it belongs, so I suppose that
technically makes it a zero-width non-breaking space.

Not only is the BOM/zero-width non-breaking space present in the page, it is
also currently present in the OP and all but one reply in this thread,
including your reply.

For anyone interested, in Opera toggle the encoding to ISO-8859-1, or for that
matter in your news reader if it has that option.
as other guesses in this
discussion. The OP had used the W3C Markup Validator, which did not say
anything about BOM - it recognizes BOM in UTF-8 and warns that it may
cause problems in browsers (which is over-cautious - you need to go back
to something like Netscape 3 to find a BOM-challenged browser). But it
does not say so about this page, and the page apparently has no BOM.

It's a bit difficult to see what the page really starts with, but
[snip]

So something needs to be fixed on the server.

Perhaps. I suspect that Adrienne may be correct in that the server may
be injecting javascript, which may account for the BOM not being at the
beginning of the file, and also explain why W3C Markup Validator did not say
anything about BOM

--
BootNic Sun Jul 31, 2011 06:39 pm
War does not determine who is right, war determine who is left.
*Ancient Chinese Proverbs*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk412Z0ACgkQmo2774GZ7qlhfwCgqAAIgIYAjAxXDCJ4vAUoyzWx
ZKEAoPF248oy5tv6LGVRIq6N+D+si/U6
=vcM1
-----END PGP SIGNATURE-----
 
Z

Zifre

Gazing into my crystal ball I observed Zifre <[email protected]>
writing in (e-mail address removed):

You are hosting at webs.com, I assume using a free account?  Looks like
they are injecting javascript into the last lines on the page, and that
is probably causing the problem.

Did you validate the page from your local computer?  You can copy and
paste the page to the validator at <http://validator.w3.org/>.

If the page validates on your system, it is probably the hosting company
that is making the page fail.  I suggest another host.


Hi Adrienne,

I changed the doctype to HTML 5 and validated from my local computer
as you've suggested and it passes the validator with 2 warnings:1) "
Using experimental feature: HTML5 Conformance Checker."; 2) " Byte-
Order Mark found in UTF-8 File."

Now I really think something is wrong with my hosting server. I am
using a free account and have to accept some advertisements. I'll try
to change to another host maybe.

Regards,
Zifre
 
Z

Zifre

Gazing into my crystal ball I observed Zifre <[email protected]>
writing in (e-mail address removed):




You are hosting at webs.com, I assume using a free account?  Looks like
they are injecting javascript into the last lines on the page, and that
is probably causing the problem.

Did you validate the page from your local computer?  You can copy and
paste the page to the validator at <http://validator.w3.org/>.

If the page validates on your system, it is probably the hosting company
that is making the page fail.  I suggest another host.


Hi Adrienne Boswell ,

I tried another hosting server and it works in IE also! I actually
chose this hosting company because it is ad free. The link is:
www.anm.atspace.eu

Thanks for you help and also thanks to everyone else who have provided
insightful opinion! Now I can continue to add more content into my
first website!

Regards,
Zifre
 
I

idle

Hi Adrienne,

I changed the doctype to HTML 5 and validated from my local computer
as you've suggested and it passes the validator with 2 warnings:1) "
Using experimental feature: HTML5 Conformance Checker."; 2) " Byte-
Order Mark found in UTF-8 File."

Now I really think something is wrong with my hosting server. I am
using a free account and have to accept some advertisements. I'll try
to change to another host maybe.

Regards,
Zifre

You're correct. Find a paid host that won't do this to you.
<script type="text/javascript"
src="http://images.webs.com/static/global/js/webs/usersites/escort.js"></script><script
type="text/javascript">if(typeof(urchinTracker)=='function'){_uacct="UA-230305-2";_udn="none";_uff=false;urchinTracker();}</script>
There are plenty low cost hosts out there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top