|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Style CustomizeCodeThatMenu allows you to customize style for whole submenus and individual items. Different styles can be assigned to ordinary items and for items that are under mouse cursor. Style specified in the topmost menu describes the default style for the whole menu and all menu items. When the style attribute is specified in the item's description or submenu description, it overrides the style of the parent. To specify style for menu and menu items, use the "style" property, as is shown at folowing construction:
where
Borders and Shadows, Itemover, Css, DirectionCodeThatMenu allows you to specify borders and shadows for your menus. For this purpose you should specify border/shadow like it shown at the example:
To customize style for items under mouse cursor you may use code like following:
You can use CSS to set certain properties for your menu:
where "test1" is a name of css-style that can be described in a separate css-file or in the html file.
To determine direction of your menu - horizontal or vertical menu - use the "direction" property. What is more, your topmost menu and its submenus may have different direction. Horizontal menu/submenu:
Vertical menu/submenu:
You may want to cancel border/shadow that was defined for menu at whole for a certain menu item or submenu.
Example - Borders and ShadowsYou can see an example and complete code here - Borders and Shadows Example Bullet ImagesWith CodeThatMenu you can specify various bullet images for menu items:
Example - Bullet ImagesYou can see an example and complete code here - Bullet Images Example BackgroundsYou can use various colors for items' background and even specify background image.
Example - BackgroundsYou can see an example and complete code here - Backgrounds Example "Box" PropertyThere are several types of styles:
As far as menu can be of two types
the menu style describes either of them depending on "box" property. When "box" is true, border, shadow, background image and background color properties will be applied to the group of items. Other properties are applied to the item. When "box" is false, all the properties are applied to the particular item of the menu, except for "itemoffset", which describes spacing between items in non-box mode.
Example - "Box" propertyYou can see an example and complete code here - Box Example Separators, Opacity and TimerYou can specifies the menu separator's style by using code like this:
Also you can define an items opacity (IE 5+):
Use a timer to determine delay when submenu is visible after mouse over event:
Example - Separators, Opacity and TimerYou can see an example and complete code here - Separators, Opacity and Timer Example Menu BarYou can describe the vertical or horizontal bar (direction is chosen depending on "direction" property). If you'd like to stretch the bar by one of the directions, -1 must be specified in the corresponding place. This feature is availabled for all menu types. But for toolbar menu bar has an addition functionality - you use bar to move toolbar menu over the window.
Example - Menu BarYou can see an example and complete code here - Menu Bar Example |
||||||||||||||||||||||
|
||||||||||||||||||||||
© CodeThat.com, 2003-2008 |
||||||||||||||||||||||