Link to home
Start Free TrialLog in
Avatar of bschave2
bschave2

asked on

How do I set menu control css styles from code behind?

I would like to set the css styles for my menu control in the code behind. I tried...


Menu1.Orientation = Orientation.Horizontal;
            Menu1.CssClass = "menu";
            Menu1.StaticMenuStyle.CssClass = "static-menu-style";
            Menu1.StaticHoverStyle.CssClass = "static-menu-style";
            Menu1.DynamicMenuStyle.CssClass = "dynamic-menu-style";

but it doesn't work. is there something I am missing? Any help would be much appreciated.
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you looked at the HTML that is being output by the menu? Is it a case that it is not adding class attributes for the CSS, or that the styles are not being correctly applied?
ASKER CERTIFIED SOLUTION
Avatar of Anurag Agarwal
Anurag Agarwal
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial