Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    IE won't show a page with HTML Comments

    Every time I add an HTML comment to my code, IE will not render the page. As soon as I remove the comment, IE displays the page. What's the deal?

    Check it out. The only difference between these pages is one single HTML comment.

    http://dasdigitalarts.com/temp/index.html
    http://dasdigitalarts.com/temp/indexwithcomment.html

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    You have started commenting your CSS code, which is not a bright idea
    Code:
    <style type="text/css">
    <!--
    body {
    	margin: 0px;
    	height: 100%;
    	width: 100%;
    }
    As a result, everything is messed up
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • Users who have thanked Kor for this post:

    yipperoo (11-22-2011)

  • #3
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    To elaborate, you "start" an html comment, but dont seem to finish it. A valid html comment is this:

    <!-- Commented HTML goes here -->


    But, you're trying to comment some embedded styles correct? A valid css comment is this

    /* Commented Styles goes here */
    Teed

  • Users who have thanked teedoff for this post:

    yipperoo (11-22-2011)

  • #4
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks! That fixed it. I didn't see that comment thingy there. I think it was from something I cut/pasted.

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello yipperoo,
    Like my tagline says, you should validate often during development. Check out the links down there about validation.



    .
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •