 |
Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
|
|
 |

|
 |
 |
|
home / documentation / reference / menubgcolor
MenuBGColor
- Description:
- The default background color for the menu.
- Value:
- String, "", or JavaScript expression that returns a string/"".
- Applies To:
- Menus.
- Browser Compatibility:
- MenuBGColor is not supported in Netscape 4. Not all browsers
may recognize all possible CSS values. Additionally, be
careful with "system specific" colors such as threedhighlight which may cause
errors in browsers that don't support them.
- Comments:
- MenuBGColor should be applied as a string, which means the
value you supply should always be in quotes. Allowed values for MenuBGColor
are the same as those allowed in the standard CSS background-color property
(see the W3C Specs)
and in fact, the value you supply is transferred as is to the JavaScript
backgroundColor property for the menu.
For those browsers that support them, you may also use system specific colors
such as threedhighlight or menu. Note, however, that not all platforms
recognize such colors; and in fact some platforms will report errors when attempting
to use them. Be sure to test system colors extensively before deploying them, and
note that you may be able to exclude system colors for a specific browser or
platform using conditional parameter assignments.
See the DHTML Lab article Accessing the User-Defined System Colors, Part I
for further information on system colors.
MenuBGColor is especially useful when you also utilize MenuPadding,
both of which are new to HierMenus version 6. The MenuBGColor is the color
that will appear in the MenuPadding when it is set.
- Examples:
// Ok:
MenuBGColor:"blue",
MenuBGColor:"#99CCFF", // #rrggbb
MenuBGColor:"", // use style sheet default
MenuBGColor:(HM_IE)?"menu":"yellow",
// menu if IE, yellow otherwise
// Incorrect:
MenuBGColor:"greatgreen", // must be valid color identifier
MenuBGColor:red, // quotes required
MenuBGColor:"FFCC99", // use leading pound (#) with rgb
MenuBGColor:'(HM_IE)?"menu":"yellow"', // no quoted expressions
- Default:
- ""
- See Also:
-
BGColor,
MenuPaddingTop,
MenuPaddingRight,
MenuPaddingBottom,
MenuPaddingLeft,
Using Classes Mini-Tutorial
|
|