Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Inline Styling of menu elemets
posted

All,

I am converting from 2011 Vol 1 to 2013 vol 1.  The site I am converting is full of inline styling.  I can't seem to figure out how to do this with 2013 vol 1.  Many of the data elements look different in different parts of the system, so applying one general theme is out.

For this problem I have a horizontal web menu, various root menu items need to be set to different widths.  Previously this was set in the Code behind:

UltraWebMenu1.Items(0).Styles.Width = 190

UltraWebMenu1.Items(1).Styles.Width = 300

How the hec can I accomplish this in the 2013 vol 1 control set?

Parents
  • 9190
    Suggested Answer
    Offline posted

    Hello Joe,

    I will be happy to assist you with your question.

    The WebDataMenu can have its MenuItemWidth set using CSS as seen in the code snippets below:

    Code Snippet
    1. protected void Page_Load(object sender, EventArgs e)
    2. {
    3.     //Adds CssClass to first root MenuItem
    4.     this.WebDataMenu1.Items[0].CssClass = "WebDataMenu_MenuItemWidth";
    5. }

     

    Code Snippet
    1. .WebDataMenu_MenuItemWidth
    2. {
    3.     width: 200px;
    4. }

     Please let me know if you have any questions regarding this matter.

Reply Children