S
Steve Richter
I would like to have a standard site navigation menu, horizontal
across the page, at the top of the page.
When I hover over a top level menu item I want a drop down menu to
appear with the same background color and text alignment as the top
level item.
Am I asking too much of the asp:menu control? I went the "-CssClass"
route in order to get my menu option text to center, but this does not
seem to play well with the styling properties of the menu item
controls.
thanks,
-----------------------------------------------------------------------------------------
<asp:Menu ID="Menu1" runat="server" Orientation=Horizontal
StaticMenuItemStyle-CssClass="menuitem"
StaticHoverStyle-CssClass="menuitem_hover"
OnMenuItemClick="Menu1_MenuItemClick">
<levelsubmenustyles>
<asp:submenustyle CssClass="menuitemz" />
</levelsubmenustyles>
<Items>
<asp:MenuItem Text="File" Value="File"/>
<asp:MenuItem Text="Edit" Value="Edit"/>
<asp:MenuItem Text="Admin" Value="Admin">
<asp:MenuItem Text="Upload source code" Value="UploadCode" />
</asp:MenuItem>
</Items>
</asp:Menu>
..menuitem
{
font: bold 1.5em Verdana, Arial, sans-serif;
padding-left:1em;
padding-right:1em;
background-color:Orange;
text-align:center;
}
..menuitem_hover
{
background-color:Yellow;
}
across the page, at the top of the page.
When I hover over a top level menu item I want a drop down menu to
appear with the same background color and text alignment as the top
level item.
Am I asking too much of the asp:menu control? I went the "-CssClass"
route in order to get my menu option text to center, but this does not
seem to play well with the styling properties of the menu item
controls.
thanks,
-----------------------------------------------------------------------------------------
<asp:Menu ID="Menu1" runat="server" Orientation=Horizontal
StaticMenuItemStyle-CssClass="menuitem"
StaticHoverStyle-CssClass="menuitem_hover"
OnMenuItemClick="Menu1_MenuItemClick">
<levelsubmenustyles>
<asp:submenustyle CssClass="menuitemz" />
</levelsubmenustyles>
<Items>
<asp:MenuItem Text="File" Value="File"/>
<asp:MenuItem Text="Edit" Value="Edit"/>
<asp:MenuItem Text="Admin" Value="Admin">
<asp:MenuItem Text="Upload source code" Value="UploadCode" />
</asp:MenuItem>
</Items>
</asp:Menu>
..menuitem
{
font: bold 1.5em Verdana, Arial, sans-serif;
padding-left:1em;
padding-right:1em;
background-color:Orange;
text-align:center;
}
..menuitem_hover
{
background-color:Yellow;
}