Forum Moderators: not2easy

Message Too Old, No Replies

How to correctly nest <li>'s?

Getting a AAA checkpoint

         

collymellon

1:38 pm on Sep 26, 2005 (gmt 0)

10+ Year Member



Hope all is well,

I have created a menu driven by asp\css, I orignally created this because a control I was previuosly using kept failing AAA checks. The new menu more aless passes with flying colours other than one point which is really buggin me.

Only one checker fails it on the point that <li>'s should be correctly nested..below is a snippet from the menu - as far as I know this is perfect (well good ;) coding:

<asp:panel id="AuxiliaryAids" runat="server" CssClass="HideMenu" EnableViewState="False">
<ul class="sub">
<li title="Signage">
<asp:HyperLink id="Aux_Signage" runat="server" EnableViewState="False" NavigateUrl="aux_signage1.aspx?MenuID=Aux_Signage">Signage</asp:HyperLink>
</li>

<li title="Induction loops">
<asp:HyperLink id="Aux_Induction" runat="server" EnableViewState="False" NavigateUrl="aux_loop_p1.aspx?MenuID=Aux_Induction">Induction Loops</asp:HyperLink>
</li>

<li title="Textphones">
<asp:HyperLink id="Aux_TextPhones" runat="server" EnableViewState="False" NavigateUrl="aux_textphone.aspx?MenuID=Aux_TextPhones">Textphones</asp:HyperLink>
</li>

<li title="Lifeslider">
<asp:HyperLink id="Aux_LifeSlider" runat="server" EnableViewState="False" NavigateUrl="aux_lifeslider.aspx?MenuID=Aux_LifeSlider">Lifeslider</asp:HyperLink>
</li>

<li title="Customer care park">
<asp:HyperLink id="Aux_CarePack" runat="server" EnableViewState="False" NavigateUrl="aux_carepack.aspx?MenuID=Aux_CarePack">Customer Care Packs</asp:HyperLink>
</li>

<li title="Fire pager">
<asp:HyperLink id="Aux_FirePager" runat="server" EnableViewState="False" NavigateUrl="aux_firepager.aspx?MenuID=Aux_FirePager">Fire Alert Pager</asp:HyperLink>
</li>
</ul>
</asp:panel>

Could any one think why this throws a checkpoint error? I don't get much detail about the error other than 'li tags need to be correctly nested and closed'. I have checked and checked the source and it all looks fine to me..Hopefully someone has run into this problem before - no worries if not!

Robin_reala

1:58 pm on Sep 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you paste in some of the output code instead of the original ASP?

collymellon

2:14 pm on Sep 26, 2005 (gmt 0)

10+ Year Member



Heres the output source on the same snippet:

<li>
<a class="ParentLink" tabindex="6" accesskey="d" href="auxiliary.aspx?MenuID=AuxiliaryAids" title="Auxiliary aids">Auxiliary Aids</a>
</li>

<div id="AAA_Menu1_AuxiliaryAids" class="HideMenu">
<ul class="sub">
<li title="Signage">
<a id="AAA_Menu1_Aux_Signage" href="aux_signage1.aspx?MenuID=Aux_Signage">Signage</a>
</li>
<li title="Induction loops">
<a id="AAA_Menu1_Aux_Induction" href="aux_loop_p1.aspx?MenuID=Aux_Induction">Induction Loops</a>
</li>
<li title="Textphones">
<a id="AAA_Menu1_Aux_TextPhones" href="aux_textphone.aspx?MenuID=Aux_TextPhones">Textphones</a>
</li>
<li title="Lifeslider">
<a id="AAA_Menu1_Aux_LifeSlider" href="aux_lifeslider.aspx?MenuID=Aux_LifeSlider">Lifeslider</a>
</li>
<li title="Customer care park">
<a id="AAA_Menu1_Aux_CarePack" href="aux_carepack.aspx?MenuID=Aux_CarePack">Customer Care Packs</a>
</li>
<li title="Fire pager">
<a id="AAA_Menu1_Aux_FirePager" href="aux_firepager.aspx?MenuID=Aux_FirePager">Fire Alert Pager</a></li>
</ul>

</div>

bird

2:22 pm on Sep 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Heres the output source on the same snippet:

<li>
<a class="ParentLink" tabindex="6" accesskey="d" href="auxiliary.aspx?MenuID=AuxiliaryAids" title="Auxiliary aids">Auxiliary Aids</a>
</li>

<div id="AAA_Menu1_AuxiliaryAids" class="HideMenu">

Funny that you now also show the unnested <li>...</li> just before your original snippet. Should be easy for you to spot the problem with this.

collymellon

2:25 pm on Sep 26, 2005 (gmt 0)

10+ Year Member



Nope this is a snippet not the whole code, the top part your referring to is nested within an <ul> specified at the top of my source,...,

Just to add to that the top <li> you are pointing out is a parent link nested within an <ul> all the links below are actually nested within ASP(.NET) panels..

collymellon

3:31 pm on Sep 26, 2005 (gmt 0)

10+ Year Member



Funny that you now also show the unnested <li>...</li> just before your original snippet. Should be easy for you to spot the problem with this.

In fact bird just shut your mouth.

jessejump

5:28 pm on Sep 26, 2005 (gmt 0)

10+ Year Member



>>>>>Auxiliary Aids</a>
</li>

<div id="AAA_Menu1_AuxiliaryAids" class="HideMenu">
<ul class="sub">

The nesting should begin
Auxiliary Aids</a>here, before LI closes.