Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Unclosed Element Div

Participant ,
Feb 07, 2017 Feb 07, 2017

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

2.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 07, 2017 Feb 07, 2017

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
Community Expert ,
Feb 07, 2017 Feb 07, 2017

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

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2017 Feb 07, 2017

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

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 07, 2017 Feb 07, 2017

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 07, 2017 Feb 07, 2017

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 07, 2017 Feb 07, 2017

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 07, 2017 Feb 07, 2017

That actually makes sense!

Thanks AGAIN!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2017 Feb 07, 2017
LATEST

A code comment is not interpreted by browsers.  It's merely a note to one's self.  Helpful but not absolutely required. 

What is required is matching all your tags with a closure.

<body> </body>

<div> </div>

<p> </p>

<h3> </h3>

<table> </table>

<ul> </ul>

<li> </li>

<a> </a>

and so on....

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines