CSS Friendly Menu Adapter with 5 tiers

Mar 28, 2012 at 4:00 PM

I am using the CSS Friendly Menu adapter to create a menu with 5 tiers.  When I hover over each tier 3 item, tiers 4 and 5 for that item automatically expand out completely, which is undesirable.  I've tried adding additional entries to the CSS file, but I can only control the style of the menu tiers, I can't stop tier 5 from popping up until I hover over the tier4 items.  What other file needs to be edited to control this behavior, or am I overlooking something very simple???

Here is my code.  (just a simple menu to demonstrate my issue.)

        <asp:Menu ID="EntertainmentMenu" runat="server" Orientation="Horizontal" onmenuitemclick="OnClick" CssSelectorClass="SimpleEntertainmentMenu">
            <Items>
                <asp:MenuItem Text="Music">
                    <asp:MenuItem Text="Classical" />
                    <asp:MenuItem Text="Rock">
                        <asp:MenuItem Text="Electric">
                            <asp:MenuItem Text="Electrical1">
                                <asp:MenuItem Text="Electrical 1.1"></asp:MenuItem>
                                <asp:MenuItem Text="Electrical 1.2"></asp:MenuItem>
                                <asp:MenuItem Text="Electrical 1.3"></asp:MenuItem>
                            </asp:MenuItem>
                            <asp:MenuItem Text="Electrical2">
                                <asp:MenuItem Text="Electrical 2.1"></asp:MenuItem>
                                <asp:MenuItem Text="Electrical 2.2"></asp:MenuItem>
                                <asp:MenuItem Text="Electrical 2.3"></asp:MenuItem>
                            </asp:MenuItem>
                            <asp:MenuItem Text="Electrical3">
                                <asp:MenuItem Text="Electrical 3.1"></asp:MenuItem>
                                <asp:MenuItem Text="Electrical 3.2"></asp:MenuItem>
                                <asp:MenuItem Text="Electrical 3.3"></asp:MenuItem>
                            </asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="Acoustical">
                            <asp:MenuItem Text="Acoustical 1">
                                <asp:MenuItem Text="Acoustical 1.1"></asp:MenuItem>
                                <asp:MenuItem Text="Acoustical 1.2"></asp:MenuItem>
                                <asp:MenuItem Text="Acoustical 1.3"></asp:MenuItem>
                            </asp:MenuItem>
                            <asp:MenuItem Text="Acoustical 2">
                                <asp:MenuItem Text="Acoustical 2.1"></asp:MenuItem>
                                <asp:MenuItem Text="Acoustical 2.2"></asp:MenuItem>
                                <asp:MenuItem Text="Acoustical 2.3"></asp:MenuItem>
                            </asp:MenuItem>
                            <asp:MenuItem Text="Acoustical 3">
                                <asp:MenuItem Text="Acoustical 3.1"></asp:MenuItem>
                                <asp:MenuItem Text="Acoustical 3.2"></asp:MenuItem>
                                <asp:MenuItem Text="Acoustical 3.3"></asp:MenuItem>
                            </asp:MenuItem>
                        </asp:MenuItem>
                    </asp:MenuItem>
                    <asp:MenuItem Text="Jazz" />
                </asp:MenuItem>
                <asp:MenuItem Text="Movies" Selectable="false">
                    <asp:MenuItem Text="Action" />
                    <asp:MenuItem Text="Drama" />
                    <asp:MenuItem Text="Musical" />
                </asp:MenuItem>
            </Items>
        </asp:Menu>

Here is my CSS File

.SimpleEntertainmentMenu ul.AspNet-Menu /* Tier 1 */
{
    width: 13em; /* This is more than (6em x 2) because we want to leave room for borders around the <li> elements that are selected */
}

.SimpleEntertainmentMenu ul.AspNet-Menu ul  /* Tier 2 */
{
    width: 6em;
    top: 100%;
    left: 0;
}

.SimpleEntertainmentMenu ul.AspNet-Menu ul ul  /* Tier 3+ */
{
    top: 0em;
    left: 6em;
}

.SimpleEntertainmentMenu li /* all list items */
{
    width: 6em;
    background: #eeeeee;
}

.SimpleEntertainmentMenu li:hover, /* list items being hovered over */
.SimpleEntertainmentMenu li.AspNet-Menu-Hover
{
    background: Black;
}

.SimpleEntertainmentMenu a, /* all anchors and spans (nodes with no link) */
.SimpleEntertainmentMenu span
{
    color: Black;
    padding: 4px 2px 4px 8px;
    border:1px solid #cccccc;
    background: transparent url(arrowRight.gif) right center no-repeat;
}

.SimpleEntertainmentMenu li.AspNet-Menu-Leaf a, /* leaves */
.SimpleEntertainmentMenu li.AspNet-Menu-Leaf span
{
    background-image: none !important;
}

.SimpleEntertainmentMenu li:hover a, /* hovered text */
.SimpleEntertainmentMenu li:hover span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover span,
.SimpleEntertainmentMenu li:hover li:hover a,
.SimpleEntertainmentMenu li:hover li:hover span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover span,
.SimpleEntertainmentMenu li:hover li:hover li:hover a,
.SimpleEntertainmentMenu li:hover li:hover li:hover span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover span,
.SimpleEntertainmentMenu li:hover li:hover li:hover li:hover a,
.SimpleEntertainmentMenu li:hover li:hover li:hover li:hover span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover span,
.SimpleEntertainmentMenu li:hover li:hover li:hover li:hover li:hover a,
.SimpleEntertainmentMenu li:hover li:hover li:hover li:hover li:hover span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover span
{
    color: White;
    background: transparent url(activeArrowRight.gif) right center no-repeat;
}

.SimpleEntertainmentMenu li:hover li a, /* the tier above this one is hovered */
.SimpleEntertainmentMenu li:hover li span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li span,
.SimpleEntertainmentMenu li:hover li:hover li a,
.SimpleEntertainmentMenu li:hover li:hover li span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li span,
.SimpleEntertainmentMenu li:hover li:hover li:hover li a,
.SimpleEntertainmentMenu li:hover li:hover li:hover li span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li span,
.SimpleEntertainmentMenu li:hover li:hover li:hover li:hover li a,
.SimpleEntertainmentMenu li:hover li:hover li:hover li:hover li span,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li a,
.SimpleEntertainmentMenu li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li.AspNet-Menu-Hover li span
{
    color: Black;
    background: transparent url(arrowRight.gif) right center no-repeat;
}

.SimpleEntertainmentMenu .AspNet-Menu-Selected /* this tier is selected */
{
    border: solid 1px #00ff00 !important;
}

.SimpleEntertainmentMenu .AspNet-Menu-ChildSelected /* a tier below this one is selected */
{
    border: solid 1px #ff0000 !important;
}

.SimpleEntertainmentMenu .AspNet-Menu-ParentSelected /* a tier above this one is selected */
{
    border: solid 1px #0000ff !important;
}

#EntertainmentMessage
{
    padding-top: 2em;
    clear: both;
}