Activating sidebar widgets causes xhtml to not validate
-
I checked the validation before applying sidebar widgets, and it validated with no errors or warnings. When I add any sidebar widgets (the regular archive, categories, etc.), the site not longer validates. I get this error:
document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag
I have searched and found that this means I have an li tag not within a ul tag, but I have checked and found none that seem to be miscoded. Here is the section of source code it says is causing the error:
# # <div id="sidebar1"> # # <li id="archives" class="widget widget_archives"><h2 class="widgettitle">Archives</h2> # <select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'> <option value="">Select Month</option> <option value='https://focusorganic.com/wp/2008/01/'> January 2008 </option> # <option value='https://focusorganic.com/wp/2007/12/'> December 2007 </option> # </select> # </li> # </div> <!-- [sidebar1] -->
Specifically, line 502.
As it is now, I’ve only put one widget in the sidebar while I am trying to fix this problem. A page showing this problem can be seen here: https://focusorganic.com/wp/testest/
- The topic ‘Activating sidebar widgets causes xhtml to not validate’ is closed to new replies.