Zen Cart Logo
Forums / General Questions / document type does not allow element "li" here

document type does not allow element "li" here

Locked

Views: 2,654

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
16 Oct 2009, 8:55 AM
#1
ben_harry avatar

ben_harry

Zen Follower

Join Date:
Mar 2007
Location:
Cornwall - uk
Posts:
462
Plugin Contributions:
0

document type does not allow element "li" here

www.bodykitsonline.co.uk is getting the following validator error on a number of lines, one example is:

Line 119, Column 20: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

<li class="cat-top"><a class="cat-not-selected-text" href="http://www.bodykitson

I have highlighted the error position red, what should i add to the code to make it correct.

Thanks
Ben

16 Oct 2009, 9:08 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: document type does not allow element "li" here

The problem has its origins slightly earlier. You need to move the HR tag immediately before the LIs to outside of their UL tag so that the validator (and browsers) can properly associate the LIs with their enclosing UL.

16 Oct 2009, 9:23 AM
#3
ben_harry avatar

ben_harry

Zen Follower

Join Date:
Mar 2007
Location:
Cornwall - uk
Posts:
462
Plugin Contributions:
0

Re: document type does not allow element "li" here

Thanks for replying,

Would you mind showing me how it should go

<hr class="catBoxDivider2" />
<li class="cat-top"><a class="cat-not-selected-text" href="http://www.bodykitsonline.co.uk/harnesses">Harnesses and Accessories</a></li>

Thanks
Ben

16 Oct 2009, 11:38 PM
#4
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: document type does not allow element "li" here

Try closing the top list with a </ul>
After the "Register New Account"

17 Oct 2009, 8:12 AM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: document type does not allow element "li" here

ben harry:

Thanks for replying,

Would you mind showing me how it should goIt must go outside of the UL tags that surround the LI tags.