...

View Full Version : i need those </div> tags dont I? (validation question)



cyborg360
01-01-2010, 05:28 AM
the site is here (http://users.rcn.com/**************/test66.html).


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.


<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>

oesxyl
01-01-2010, 06:09 AM
the site is here (http://users.rcn.com/**************/test66.html).




<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

cyborg360
01-01-2010, 06:17 AM
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:

<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>

oesxyl
01-01-2010, 06:24 AM
by indent do you mean something like the following:

<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, :)


<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

cyborg360
01-01-2010, 06:29 AM
yes but a 'little more indented', :)
the idea is to see how pair <div> </div> match, :)


<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:


<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>

oesxyl
01-01-2010, 06:42 AM
<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

cyborg360
01-01-2010, 06:47 AM
<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>
[QUOTE]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.

oesxyl
01-01-2010, 06:50 AM
[QUOTE=oesxyl;905187]
<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.

cyborg360
01-01-2010, 06:53 AM
[QUOTE=cyborg360;905188]
on line 140 you have </div></div>, remove one of them.

did you expect this type of issue (http://users.rcn.com/**************/test67.html) to occur when the div was removed? wc3 validator is still complaining about the other div

oesxyl
01-01-2010, 07:00 AM
[QUOTE=oesxyl;905189]

did you expect this type of issue (http://users.rcn.com/**************/test67.html) 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

cyborg360
01-01-2010, 09:40 AM
I think I'll work on a way of transplanting that javascript code out of the html file.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum