Msg#: 4269142 posted 6:37 pm on Feb 18, 2011 (gmt 0)
Hi everyone the page in question is
There is an issue with code from a 3rd party when validating that i have attempted to contact but this post is about the 'extra' div.
I can't for the life of me figure out why this extra div is causing the problem in the validatior.
Line 516, Column 47: end tag for element "div" which is not open </div> </div><div class="clear"></div></div>
This causes <div id="mainy"> The green background that is through the whole top section of the site to end and then allows the bottom <div class="pageEdge"> <div class="pageBottom"> Etc to display the footer correctly. Removing that extra </div> doesnt terminate the mainy but validates?
Msg#: 4269142 posted 8:23 pm on Feb 18, 2011 (gmt 0)
Maybe thinking too simple, but the comment seems obvious to me. You open a div then close it two times, so looking to it at that way an "end tag for element "div" (is used for a tag) which is not open".
A quick count of opening and closing tags of div's in your page learns that there is an equal amount of them, but I find your code a little hard to read. Being not familiar with your intentions there seem to be "empty div's" and a lot of nested div's, so someone (like me) that is new to the code easily looses track. Maybe validating is a matter of looking at the structure of your page.
Msg#: 4269142 posted 6:58 pm on Feb 19, 2011 (gmt 0)
ive tried to go through it and find out where the extra div etc is.. but with no luck...
I've tried looking at this twice with no luck.. even I can't match all that in my head - over 2000 lines! ;)
you mention about the 3rd party code.. have you actually tested and validated this 3rd party code in a blank HTML page to prove it's actually that that is generating the wrong code? did your page validate before adding this code?
Removing that extra </div> doesn't terminate the mainy but validates?
it's because it's not mainy that's the problem..
----- much later, 3rd time lucky
a) you need to pay me lots of money for this :)
b) search your source for the line (it's around line 100, despite the fact the validator can't reconcile it until line 513)
<div style="padding:2px;" /> </div>
c) find where your template is generating that code and change it to:
<div style="padding:2px;"> </div>
i.e. remove the self closing "space/" from the opening tag
PS: this wasn't just a glance, that's why you now owe me lots of money! :)
Msg#: 4269142 posted 1:05 am on Feb 21, 2011 (gmt 0)
OMG SUZY! Suzy suzy suzy... i thank you completely!
That completely makes sense why the validator wasn't finding it... oi oi!
100% errors that remain are from the Text link ads generated code which sadly generates <TABLE> instead of <table> I emailed their support about it so hopefully they will make the code XHTML compliant.
Anyway... very much thank you again to suzyUK. You are seriously my hero :)