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 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    88
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Exclamation Correctly Nested but Validator having Fit, Please help

    I ran this chunk of code through the validator, and it keeps comming up with an error. I don't see how it could be, as the DIV's are nested correctly as far as I can tell.

    Can anyone tell me why the validator is having a fit with this? Thanks.

    Code:
    <!-- BEGINS SIDEBOX -->
    <div class="sideboxbackground"> 
    
    <!-- SideBox Header -->
    <div class="sidebarheaderbar">
    <div class="sidebarheadertext">
    Defcon LVL
    </div><!-- End Sidebox Header Text -->
    </div><!-- End Sidebox Header Bar -->
    
    <!-- Side Box Content -->
    <div class="sidebartext">
    <br>
    <IMG SRC="http://www.uafclan.com/main/assets/defcon5.gif" ALT="We are currently at Defcon 5">
    </div><!-- End Sidebartext -->
    <br>
    </div><!-- END Sideboxbackground -->
    
    <!-- END SIDEBOX -->

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    For the validator to validate direct input it the code needs to have a doctype. If you had read what the validator told you to do before you validated you would have known this. Try this instead.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <body>
    <!-- BEGINS SIDEBOX -->
    <div class="sideboxbackground">
    	<!-- SideBox Header -->
    	<div class="sidebarheaderbar">
    		<div class="sidebarheadertext"> Defcon LVL </div>
    		<!-- End Sidebox Header Text -->
    	</div>
    	<!-- End Sidebox Header Bar -->
    	<!-- Side Box Content -->
    	<div class="sidebartext"> <br>
    		<IMG SRC="http://www.uafclan.com/main/assets/defcon5.gif" ALT="We are currently at Defcon 5"> </div>
    	<!-- End Sidebartext -->
    	<br>
    </div>
    <!-- END Sideboxbackground -->
    <!-- END SIDEBOX -->
    </body>
    </html>
    It validates.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jan 2007
    Posts
    88
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Oh, I did put a doctype in, but I didn't think the proper HTML structure was needed to validate.

    Thank you very much! It's highly appreciated.


  •  

    Posting Permissions

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