Using the CSSPrefix property for design of sub-menus

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The CSSPrefix property allows you to not only use several menu controls with different styles on one page, but also to specify the style of menu sub-items at any chosen level.

 

Here's an example of how to specify various styles for particular menu levels (it can be used for both CMSMenu and CMSTreeMenu):

 

First, you need to specify the list of prefixes for particular levels using the CSSPrefix property:

 

CMSMenu1.CSSPrefix = "MainMenu;MainMenuSubMenu;MainMenuOtherLevels"

 

... now you define the following styles:

 

.MainMenuCMSMenu

... for menu control

 

.MainMenuCMSMenuItem

.MainMenuCMSMenuItemMouseUp

... etc. for the first level of the menu (level 0)

 

.MainMenuSubMenuCMSMenu

.MainMenuSubMenuCMSMenuItemMouseUp

... etc. for the second level of the menu (level 1)

 

.MainMenuOtherLevelsCMSMenu

.MainMenuOtherLevelsCMSMenuItemMouseUp

... etc. for all underlying levels of the menu (level 2 and all higher levels)

 

Page url: http://devnet.kentico.com/docs/controls/index.html?using_the_cssprefix_property_for_design_of_sub_menus.htm