ComponentOne Menu for ASP.NET Web Forms
Task-Based Help / Working with CSS Selectors / Customizing Appearance with CSS Selectors
In This Topic
    Customizing Appearance with CSS Selectors
    In This Topic

    You can use CSS selectors to customize the appearance of the C1Menu control in the Source View.

    1. In the Source View, locate the first set of <asp:Content> tags. Add the following tags between the <asp:Content> </asp:Content> tags that will allow you to insert CSS styling.

      To write code in Source View

      <style type="text/css"> </style>
    2. Use the following CSS selector to set the general appearance of the control.

      .wijmo-wijmenu
      • Insert {background: #339900; border-color: Blue; } after the CSS selector. This will set the background to green with a blue border.
      • Insert .wijmo-wijmenu-text {color: #992233; } to set the color of the text for the control.
      • Insert .wijmo-mijmenu-item {font-family: French Script MT; } and .wijmo-wijmenu-parent {font-family: Blackadder ITC; } to set the fonts for menu items and parent menu items.
      • Press F5 to run your program. Note the changes that you have made to the appearance of the C1Menu control. It should appear as in the following image. Note that parent menu items and regular menu items appear in different font styles.

        CSS