Skip to main content
maryanns50585047
Known Participant
Feb 7, 2017 4:46 PM UTC
Answered

Unclosed Element Div

This page can be viewed at http://www.maselva.com/Certification.html# Page displays properly on server but Dreamweaver does not validate.

Nancy has told me, "You MUST learn to comment ALL of your tags", so I am adding comments in order to close these elements.

Either I have done this incorrectly (no doubt) or something all together different is the problem.

I would appreciate any light you could shed on this.

MaryAnn in Texas

    This topic is closed to new replies. Start a new post to keep the conversation going.
    osgood_Correct answer
    Legend
    Feb 7, 2017 6:05 PM UTC

    The end of your page should look like below:

    </div>

    </div>
    <!-- end media-object-default -->
    </div>
    <!-- end col-lg-6 col-md-6 -->
    </div>
    <!-- end container -->

    </body>
    </html>

    But you have this:

    </div>

    <!-- end col-lg-6 col-md-6 -->

    <!-- end media-object-default -->
    <!-- end container -->

    </body>
    </html>

    7 replies

    osgood_Correct answer
    Legend
    Feb 7, 2017 6:05 PM UTC

    The end of your page should look like below:

    </div>

    </div>
    <!-- end media-object-default -->
    </div>
    <!-- end col-lg-6 col-md-6 -->
    </div>
    <!-- end container -->

    </body>
    </html>

    But you have this:

    </div>

    <!-- end col-lg-6 col-md-6 -->

    <!-- end media-object-default -->
    <!-- end container -->

    </body>
    </html>

    Translate
    maryanns50585047
    Known Participant
    Feb 7, 2017 6:10 PM UTC

    Sorry about the blank email…trigger finger.

    The light bulb comes on!

    So I had correctly added the comments. I just must add close divs before comment!? Also I see the sequence of comments on mine was not correct.

    Translate
    Legend
    Feb 7, 2017 7:05 PM UTC

    maryanns50585047 wrote:

    So I had correctly added the comments. I just must add close divs before comment!?

    Sure comments are just comments to help you identify where the container ends, The container still needs to be closed with a closing tag.

    maryanns50585047 wrote:

    Also I see the sequence of comments on mine was not correct.

    Your  'media-object-default' container sits inside your 'col-lg-6 col-md-6 'container so it needs to be closed first, so natuarlly the comment would come first.

    Translate
    Nancy OShea
    Community Expert
    Community Expert
    Feb 7, 2017 5:40 PM UTC

    See screenshot.  Hopefully this will help you identify code errors while you work.  In the example below, I have 2 un-closed <div> tags from line 9 and line 8.

    Nancy

    Translate
    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    Feb 7, 2017 5:17 PM UTC

    You have 3 un-closed <div> tags.  Try closing them with </div> and see how it looks.

    Nancy

    Translate
    Nancy O'Shea— Product User & Community Expert