How to style an asp.net menu with CSS
Posted
by md1337
on Stack Overflow
See other posts from Stack Overflow
or by md1337
Published on 2010-04-16T18:44:02Z
Indexed on
2010/04/16
18:53 UTC
Read the original article
Hit count: 450
ASP.NET
I'm in the process of styling an asp.net menu and I'm trying to understand the meaning of the StaticSelectedStyle-CssClass and StaticHoverStyle-CssClass parameters.
My understanding is that the styles defined with these parameters are applied as CSS classes to the relevant elements, whenever needed. So I created my menu as follows:
<asp:Menu ID="NavigationMenu" DataSourceID="NavigationSiteMapDataSource"
StaticMenuStyle-CssClass="StaticMenuStyle"
StaticMenuItemStyle-CssClass="StaticMenuItemStyle"
StaticSelectedStyle-CssClass="StaticSelectedStyle"
StaticHoverStyle-CssClass="StaticHoverStyle"
Orientation="Horizontal"
MaximumDynamicDisplayLevels="0"
runat="server">
</asp:Menu>
It works for StaticMenuStyle-CssClass and StaticMenuStyle-CssClass (the classes are applied to the relevant elements), but StaticSelectedStyle-CssClass and StaticHoverStyle-CssClass are not applied, regardless of the selected or hover status of an element.
What am I supposed to do to make this work?
Thanks.
© Stack Overflow or respective owner