Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am trying to create a submenu in asp.net website.
The static menuitem is at the right of the screen.
But the word 'Control' is pretty short so the dynamic menuitems only show partial.
How can I change the dynamic menu-items to end at the right of the screen in CSS. So the dynamic items do not start at the left pixels like the static menu item

What I have tried:

ASP
<asp:Menu runat="server" ID="MnuMenu" Orientation="Horizontal" CssClass="Menu" DisappearAfter="2500"
                            MaximumDynamicDisplayLevels="5" StaticDisplayLevels="1" DynamicEnableDefaultPopOutImage="false" StaticEnableDefaultPopOutImage="false" >
                            <StaticMenuItemStyle HorizontalPadding="10" VerticalPadding="7" CssClass="MenuStatic" />
                            <DynamicMenuItemStyle HorizontalPadding="10" VerticalPadding="7" CssClass="MenuDynamic" />
                        </asp:Menu>


CSS
.Menu {
    right: 10px;
    top: 58px;
    position: absolute;
    font-size: 16px;
    text-decoration: none;
    vertical-align: middle;
    color: #8C8279;
}
    .Menu a.highlighted {
        background-color: #012169;
        color: white;
        text-decoration: none;
        box-shadow: 5px 5px 5px rgba(40, 40, 50, 0.65);
    }

    .Menu a.selected {
        background-color: #F2CD00;
        color: #8C8279;
        text-decoration: none;
        box-shadow: 5px 5px 5px rgba(40, 40, 50, 0.25);
    }

    .Menu a.clicked {
        text-decoration: none;
        color: #8C8279;
    }
    .MenuStatic
    {
        direction: ltr;
    }
.MenuDynamic{
    z-index: 20;
    text-align: left !important;
    display: grid;
    
}
Posted
Comments
Herman<T>.Instance 16-May-18 12:05pm    
No one knows how to prevent the submenu is only partial visible?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900