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 11 of 11
  1. #1
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts

    i need those </div> tags dont I? (validation question)

    the site is here.

    end tag for element "div" which is not open
    </div></div>

    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occurred in a script section of your document, you should probably read this FAQ entry.
    Code:
    <div style="width: 225px; height: 155px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
    	&nbsp;<img alt="" src="images/news.png" height="16" width="222" /><div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">// <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><div id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></div></ilayer>')}
    if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');} // ]]></script>
    </div></div>
    Last edited by cyborg360; 01-01-2010 at 05:44 AM.

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by cyborg360 View Post
    the site is here.



    Code:
    <div style="width: 225px; height: 155px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
    	&nbsp;<img alt="" src="images/news.png" height="16" width="222" /><div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">// <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><div id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></div></ilayer>')}
    if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');} // ]]></script>
    </div></div>
    a guess, one of the </div> is part of the javascript, not sure try to indent the code.

    best regards

  • #3
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    a guess, one of the </div> is part of the javascript, not sure try to indent the code.

    best regards
    by indent do you mean something like the following:
    Code:
    <div style="width: 225px; height: 155px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
    	&nbsp;<img alt="" src="images/news.png" height="16" width="222" /><div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">// <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><div id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></div></ilayer>')}
    if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');} // ]]></script>
    
    </div>
    </div>

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by cyborg360 View Post
    by indent do you mean something like the following:
    Code:
    <div style="width: 225px; height: 155px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
    	&nbsp;<img alt="" src="images/news.png" height="16" width="222" /><div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">// <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><div id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></div></ilayer>')}
    if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');} // ]]></script>
    
    </div>
    </div>
    yes but a 'little more indented',
    the idea is to see how pair <div> </div> match,
    Code:
    <div style="width: 225px; height: 155px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
       <img alt="" src="images/news.png" height="16" width="222" />
       <div style="width: 225px; height: 155px; float: left;">
       <script type="text/javascript">// <![CDATA[
         if(document.layers){
             document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><div id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></div></ilayer>');
         }
         if(document.getElementById||document.all){
             document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');
         } // ]]></script>
      </div>
    </div>
    after I look to this part seems you need to remove one of the </div> but I'm still not sure about this.

    best regards

  • #5
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    yes but a 'little more indented',
    the idea is to see how pair <div> </div> match,
    Code:
    <div style="width: 225px; height: 155px; float: left; height: 16px; background-color: #000000; color: #FFFFFF; margin-left: 0px; margin-bottom: 0px; font-size: small; padding-left: 0px;">
       <img alt="" src="images/news.png" height="16" width="222" />
       <div style="width: 225px; height: 155px; float: left;">
       <script type="text/javascript">// <![CDATA[
         if(document.layers){
             document.write('<ilayer id="ns4div" width="'+swidth+'" height="'+sheight+'" bgcolor='+sbcolor+'><div id="ns4div1" width="'+swidth+'" height="'+sheight+'" onmouseover="sspeed=0;" onmouseout="sspeed=rspeed"></div></ilayer>');
         }
         if(document.getElementById||document.all){
             document.write('<div style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;"></div></div>');
         } // ]]></script>
      </div>
    </div>
    after I look to this part seems you need to remove one of the </div> but I'm still not sure about this.

    best regards
    here's the code again, a bit more readable:

    Code:
    <div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">
    // <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" 
    height="'+sheight+'" bgcolor='+sbcolor+'>
    
    <div id="ns4div1" width="'+swidth+'" height="'+sheight+'" 
    onmouseover="sspeed=0;" onmouseout="sspeed=rspeed">
    </div></ilayer>')}
    if(document.getElementById||document.all){document.write('<div style="position:relative;overflow:hidden;
    width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" 
    onmouseover="sspeed=0" onmouseout="sspeed=rspeed"><div id="iens6div" style="position:relative;width:'+swidth+'px;">
    </div>
    </div>');} // ]]></script>
    
    </div>
    
    </div>

  • #6
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Code:
    <div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">
    // <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" 
    height="'+sheight+'" bgcolor='+sbcolor+'>
    
    <div id="ns4div1" width="'+swidth+'" height="'+sheight+'" 
    onmouseover="sspeed=0;" onmouseout="sspeed=rspeed">
    </div></ilayer>')}
    if(document.getElementById||document.all){document.write('
    <div style="position:relative;overflow:hidden;
    width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" 
    onmouseover="sspeed=0" onmouseout="sspeed=rspeed">
    <div id="iens6div" style="position:relative;width:'+swidth+'px;">
    </div>
    
    </div>');} // ]]></script>
    
    </div>
    
    </div>
    one pair in first if block and two pair in the second if, that means remove one </div> from outside the script block

    best regards

  • #7
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    [QUOTE=oesxyl;905187]
    Code:
    <div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">
    // <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" 
    height="'+sheight+'" bgcolor='+sbcolor+'>
    
    <div id="ns4div1" width="'+swidth+'" height="'+sheight+'" 
    onmouseover="sspeed=0;" onmouseout="sspeed=rspeed">
    </div></ilayer>')}
    if(document.getElementById||document.all){document.write('
    <div style="position:relative;overflow:hidden;
    width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" 
    onmouseover="sspeed=0" onmouseout="sspeed=rspeed">
    <div id="iens6div" style="position:relative;width:'+swidth+'px;">
    </div>
    
    </div>');} // ]]></script>
    
    </div>
    
    </div>
    one pair in first if block and two pair in the second if, that means remove one </div> from outside the script block
    sorry, can you plz highlight the problem that needs removal. I remove one </div> from the outermost layer (the last line) and it creates design issues.
    Last edited by cyborg360; 01-01-2010 at 06:51 AM.

  • #8
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    [QUOTE=cyborg360;905188]
    Quote Originally Posted by oesxyl View Post
    Code:
    <div style="width: 225px; height: 155px; float: left;"><script type="text/javascript">
    // <![CDATA[if(document.layers){document.write('<ilayer id="ns4div" width="'+swidth+'" 
    height="'+sheight+'" bgcolor='+sbcolor+'>
    
    <div id="ns4div1" width="'+swidth+'" height="'+sheight+'" 
    onmouseover="sspeed=0;" onmouseout="sspeed=rspeed">
    </div></ilayer>')}
    if(document.getElementById||document.all){document.write('
    <div style="position:relative;overflow:hidden;
    width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0);background-color:'+sbcolor+';" 
    onmouseover="sspeed=0" onmouseout="sspeed=rspeed">
    <div id="iens6div" style="position:relative;width:'+swidth+'px;">
    </div>
    
    </div>');} // ]]></script>
    
    </div>
    
    </div>

    sorry, can you plz highlight the problem. I remove one </div> from the outermost layer and it creates design issues.
    on line 140 you have </div></div>, remove one of them.

  • #9
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    [QUOTE=oesxyl;905189]
    Quote Originally Posted by cyborg360 View Post
    on line 140 you have </div></div>, remove one of them.
    did you expect this type of issue to occur when the div was removed? wc3 validator is still complaining about the other div

  • #10
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    [QUOTE=cyborg360;905191]
    Quote Originally Posted by oesxyl View Post

    did you expect this type of issue to occur when the div was removed? wc3 validator is still complaining about the other div
    yes, remove both </div>. Was two messages before you remove first </div>
    # Error Line 140, Column 6: end tag for element "div" which is not open

    </div></div>



    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occurred in a script section of your document, you should probably read this FAQ entry.
    # Error Line 140, Column 12: end tag for element "div" which is not open

    </div></div>



    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occurred in a script section of your document, you should probably read this FAQ entry.
    now is only one:
    # Error Line 140, Column 6: end tag for element "div" which is not open

    </div>



    The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

    If this error occurred in a script section of your document, you should probably read this FAQ entry.
    # Error
    best regards

  • #11
    Regular Coder
    Join Date
    Nov 2009
    Posts
    202
    Thanks
    25
    Thanked 0 Times in 0 Posts
    I think I'll work on a way of transplanting that javascript code out of the html file.


  •  

    Posting Permissions

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