A unclosed div problem almost make me crazy. It is very difficult to track especially when the page is long and complex.
Any suggestions?
A unclosed div problem almost make me crazy. It is very difficult to track especially when the page is long and complex.
Any suggestions?
the World Wide Web Consortium HTML Validator is great at catching HTML errors.
As stated already, running your code through the W3C Validator is great but if your page is complex, you still may not know exactly where to find the open div.
I like using tabs to indent my code. It keeps it visually organized so that these issues are easier to find, children, siblings, parents, etc... they'll appear more obvious.
EDIT: Also, I'll use a few HTML comments to mark closing tags in the complex areas. I keep these to a minimum for neatness.
Taking Milad's suggestion a bit further, you can break your document source down and then do another find, continuing until you find the unmatched culprit.
When you are working with many modules (using a CMS), or don't have access to the W3C tool (because you are working locally), this approach is really helpful.