HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Page Shows as Blank in IE
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
elfhelm



Joined: 09 May 2006
Posts: 6

PostPosted: Tue May 09, 2006 6:44 pm     Page Shows as Blank in IE Reply with quote

Now, I've had problems with Firefox before, but this is a first for me. I have recently created a new layout for my website, but it shows up as a blank page in IE while working perfectly in Firefox.

My code is horrendous, I know, but presently, I just need it to show up. Any ideas on what needs to be changed for it to be viewable in Internet Explorer (not that it exactly lines up in IE even when it was working...)?
The page:

http://geocities.com/elfhelm00/main.html

Oh, and none of the internal links are supposed to work, in case you were wondering.
Thanks so much.
kanenas



Joined: 14 Dec 2004
Posts: 310

PostPosted: Wed May 10, 2006 2:19 am     Improper comment close in style Reply with quote

The comment markers enclosing the header style combined with comments later in the document are confusing IE. You have "--!>"; replace it with "-->" so it looks like:
Code:
<style type="text/css">
<!--
...
-->
</style>

Note HTML comments don't start with "<!--" and end with "-->". HTML comments are markup, where "<!" starts the tag and ">" closes the tag (HTML comments are actually SGML comments, which is why the tag starts with "<!"). It's the "--" that starts and ends a comment. Whitespace is allowed between the end-of-comment ("--") and tag close, but proper handling of non-whitespace characters (such as the "!" in "--!>") is undefined; most browsers do it gracefully. IE wrongly treats "-->" as the end-of-comment tag and thus doesn't stop until it encounters the next "-->" (which is after the "content" and "info" blocks), which turns most of your page into a comment. Interestingly, if there are no later comments, IE ends the comment on the "--!>" in your style sheet. IE also doesn't properly handle "-- >" even though it is completely legal.

The HTML 4.01 description of comments is weak; the HTML 2.0 description is bang-on.

The following examples are all valid comments.
Code:
<!-- 1 > 0 -- >
<!-- a comment -- -- still a comment -->
<!-- all ---- these ---- words ---- are ---- comments -->
elfhelm



Joined: 09 May 2006
Posts: 6

PostPosted: Wed May 10, 2006 8:50 am     Reply with quote

Sweet, that fixed it, thanks. It's weird that I didn't catch that though - not that I would have known why it was wrong, but I was comparing the code to the former layout which didn't have that error. Thanks again.
kanenas



Joined: 14 Dec 2004
Posts: 310

PostPosted: Wed May 10, 2006 4:40 pm     The error was hard to notice. Reply with quote

It's such a small difference I'd be more surprised if you had caught it with a vdiff.

It would probably help to mention how I found the error (which wasn't by noticing the "--!>") so you can know how to fish.

I cut sections of the source until something started to show up, narrowing down which part of the source was preventing display. When I cut the last comment following the style sheet, IE displayed what remained of the page. This immediately led me to examine other comments in the page, at which point I noticed the "--!>".

The process is similar to that described in "Debugging CSS, the Easy Way" but applied to HTML rather than CSS, and I was trying to remove rather than keep the buggy code. The article suggests validating the source as the first step (a course I also endorse and took), but in this case the validation didn't catch the error in the comment. I used W3C's markup validator which will usually catch extraneous characters between an end-of-comment marker and a tag end marker, just not when the comment is masking the content of a (e.g.) style or script tag.
Druid



Joined: 22 Sep 2009
Posts: 1

PostPosted: Tue Sep 22, 2009 7:39 am     IE Page also comes up blank for me Reply with quote

I've tried crawling all over the page in my neophyte coding skill and I have no clue why it is now broken.

I tested it last week and it worked in IE. I have been going over our entire website trying to simplify the codes (a lot of this was built by other people of varying degrees of experience & skill), and I must have made a change that didn't affect the Firefox view, but caused the page to crap out in IE. I haven't noticed this problem on any of the other pages in IE. Any help or pointers would be greatly appreciated!

http://futureaces.org/about_our_scholarships.php

(I know this uses some odd coding and I am working to remove the table format)

Thanks!
kanenas



Joined: 14 Dec 2004
Posts: 310

PostPosted: Fri Oct 09, 2009 4:03 pm     Reply with quote

Don't threadjack. This thread is over 3 years old and has nothing to do with whatever issue you have.

Speaking of issues, what is yours? Your post gives no clue what the problem is. When describing a problem, say what you want to happen and what actually happens. Include the versions of software you tested. Does IE7 work? How about IE8? Read "How To Ask Questions The Smart Way" for more info on asking for help.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> General HTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial