Error: End tag div seen, but there were open elements.

Shaun Bartlett
Shaun Bartlett used Ask the Experts™
on
I have tried to understand the Error: End tag div seen, but there were open elements, but when I have viewed the source code for this page http://www.roof-repairs-colchester.co.uk/index.html I can not see any problem with it. Can someone please help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mukesh YadavFull Stack Developer

Commented:
Try this ;)

Here 4 div elements don't have closing tags. These are:

     
  • <div class="wrapper">
       
  • <div class="row row-offcanvas row-offcanvas-left">
         <!--[if lt IE 7]><p class=browsehappy>You are using an <strong>outdated</strong> browser. Please <a href=http://browsehappy.com/ >upgrade your browser</a> to improve your experience.<![endif]-->
         
  • <div class="inner-wrapper">
           
  • <!-- Last div.container  -->
Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Commented:
Extra closing DIV here
div.jpg
Full Stack Developer
Commented:
As I am checking your code, closing tags are missing at few of the places.
1. Close the
<nav class="collapse navbar-collapse">

Open in new window

tag at line #96 after the closing </ul> tag.
2. Close the span tag at
<h2 class="lead-title"><span>Any Kind of Pitched Roof &amp; Flat Roofing Repairs</h2>

Open in new window

Before the closing </h2> tag at line #159
3.  Close the span tag at
 <h2 class="widget-title"><span>Popular Websites</h2>

Open in new window

Before the closing </h2> tag at line #321
4.  Close the span tag at
 <h2 class="widget-title"><span>Contact us</h2>

Open in new window

Before the closing </h2> tag at line #321
5.  Close the span tag at
 <h2 class="widget-title"><span>Office Hours</h2>

Open in new window

Before the closing </h2> tag at line #341
6.  Close the span tag at
 <h2 class="widget-title"><span>INFORMATION</h2>

Open in new window

Before the closing </h2> tag at line #355
7. Add a closing </div> tag for following
<div class="wrapper">
<div class="row row-offcanvas row-offcanvas-left">
<div class="inner-wrapper">

Open in new window

Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I have managed to correct most errors except those shown below, I am not sure where to add or remove the element with the error. If someone could show mw exactly what I should do by correcting the errors in the text below. ( source code of page http://www.roof-repairs-colchester.co.uk/ ).

1)
Error: End tag div seen, but there were open elements.
From line 97, column 1; to line 97, column 6
li>↩</ul>↩</div>↩ </di

2)
Error: Unclosed element nav.
From line 88, column 1; to line 88, column 38
default">↩<nav class="collapse navbar-collapse">↩<ul c

3)
Error: End tag for  body seen, but there were unclosed elements.
From line 397, column 1; to line 397, column 7
/script>↩↩</body>↩↩</ht

4)
Error: Unclosed element div.
From line 316, column 3; to line 316, column 25
 </div>↩  <div class="container">↩  <di

5)
Error: Unclosed element div.
From line 75, column 1; to line 75, column 27
endif]-->↩<div class="inner-wrapper">↩<div

6)
Error: Unclosed element div.
From line 73, column 1; to line 73, column 50
wrapper">↩<div class="row row-offcanvas row-offcanvas-left">↩<!--[

7)
Error: Unclosed element div.
From line 72, column 1; to line 72, column 21
d>↩<body>↩<div class="wrapper">↩<div

Author

Commented:
I managed to fix all but one error, when I do correct the error below,  the formatting of the footer is changed and looks awful :

Error: End tag for  body seen, but there were unclosed elements.
From line 404, column 1; to line 404, column 7
/script>↩↩</body>↩↩</ht

Error: Unclosed element div.
From line 322, column 3; to line 322, column 25
 </div>↩  <div class="container">↩  <di
Banshi lal dangiFull Stack Developer

Commented:
Hello Shaun,

Try to put closing div tag from #88 and #89  to before the </body> closing tag.

Author

Commented:
At last, with the tips I have received there are no errors, thanks for your help everyone.

Colin
Banshi lal dangiFull Stack Developer

Commented:
Answered

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial