4 Replies Latest reply on Jun 25, 2012 8:18 AM by MurraySummers

    unbalanced div tags

    aonefun Level 1

      I have used the WC3 validator to find unbalanced div tags.


      One error listed is as follows:

      line 2209, Column 39: end tag for "div" omitted, but OMITTAG NO was specified

            <!-- InstanceEndEditable --></td>

      For correcting this issue, where is the closing div tag to be inserted, is it immediately after the listed code, in this case it is immediately after </td>?

        • 1. Re: unbalanced div tags
          BenPleysier Adobe Community Professional & MVP

          I don't understand. Why would you have the <td> tag inside an editable area and the </td> outside of an editable area. It's sort of like placing the top half of a corpse on one side and the bottom half on the other side of a closed guilotine. The two halves are no longer one body.



          • 2. Re: unbalanced div tags
            MurraySummers Level 8

            We only  know that the </td> is outside the editable region.  But I do like your analogy!


            @aonefun, we'd need to see more code to answer your question.  Like where is the opening div tag placed?  But for SURE the closing </div> could never go immediately after </td> since the only thing that could go there would be <td> or </tr>.

            • 3. Re: unbalanced div tags
              aonefun Level 1

              Thanks for the replies.


              This is the webpage in question:


              http://www.canchair.com/new_web_product_detail.asp?ProductID=862&ProductFamily=5&ProductFa milySub=


              If you can assist me with this div tag mess that would be great.


              For future reference I was wondering if the validator is directing me to the exact insertion point of the missing </div> tag by provided a line of code along with the error listing. If not, then what does the provided line of code indicate? Kindly clarify.


              I do understand that the missing </div> tag cannot succeed the </td> as the table has not yet been closed but have not paid enough attention to have noticed that, thanks!

              • 4. Re: unbalanced div tags
                MurraySummers Level 8

                There are several missing or misplaced </div> tags on that page (I find 310 instances of <div and only 308 of </div>).


                The first should go here -


                                <!-- end of  country2 -->






                The second most probably should go ABOVE the start point of the "Layer4" (LAYERS? EEK), although your code is not well chosen, so it's hard to know exactly -










                      <div id="Layer4" style="border-width: thin;border-style:solid;border-color:#666666; position:absolute; width:600px; height:610px; z-index:300; left: 0px; top: 0px;visibility: hidden;">



                Because of the poorly chosen code, the validator is confused. The insertion point it shows is incorrect.