...

View Full Version : Validating XHTML



rfq
01-05-2013, 07:26 AM
Looking for help or a pointer to resolve errors to sidebar.php file. Website is rfqpro.com

W3 Validator is showing 20 errors and they all appear to relate to text widgets in sidebar.php

Error - Document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

My Code:
<!--sidebar.php-->
<li id="text-390437721" class="widget widget_text"> <div class="textwidget">

The sidebar.php file in the theme editor does not show this text anywhere? Do I need to access in another file and can you suggest a fix?

many thanks and appreciate your help Mark

AndrewGSW
01-05-2013, 07:54 AM
LIs should only appear as child elements to a UL or OL.

You are using WordPress: I can't help you with this. If you are unable to find the relevant content then you may have to live with it not validating.

rfq
01-05-2013, 08:03 AM
Andrew thanks. Some Wordpress users suggests adding widget text to style.css file ?

Maybe time for a theme change ...

AndrewGSW
01-05-2013, 08:11 AM
Andrew thanks. Some Wordpress users suggests adding widget text to style.css file ?

Maybe time for a theme change ...

Changing a .css file won't cause the HTML to validate.

webdevs
01-05-2013, 12:48 PM
Make sure, your website or sidebar li sturctures should be standard for example.
<ul>
<li>content over here</li>
<li>content over here</li>
</ul>

charlyanderson
01-05-2013, 06:30 PM
What is the widget that you are referring to? If it's one you downloaded and installed there is probably and separate file to the sidebar page



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum