Please Note:
HierMenus is protected by copyright laws. Use of the HierMenus code requires a paid licensing agreement.
Click Here to Register

Site Navigation
Bulletins
About
Documentation
FAQ
Samples
Known Issues
Technology Jobs

internet.commerce

Partner With Us














          
internet.com

IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 
HierMenusCentral Enhance the Functionality of Your Web Site with DHTML HierMenus.
    

home / documentation / reference / menubackgroundproperties

MenuBackgroundProperties

Description:
The additional CSS properties to be applied to the MenuBackgroundImage.

Value:
null, or valid CSS background properties, enclosed in quotes.

Applies To:
Menus.

Browser Compatibility:
MenuBackgroundProperties is not supported in Netscape 4.x or 6.0x. CSS support for individual background properties may vary from browser to browser.

Comments:
MenuBackgroundProperties can be used to pass additional CSS properties pertaining to the MenuBackgroundImage, such as left or repeat-x, to the CSS background property of the menu. Such parameters complement the MenuBackgroundImage itself and typically provide further instructions to the browser pertaining to the exact placement and behavior of the background image.

The values allowed for MenuBackgroundProperties mirror those allowed within standard CSS definitions. The full scope of properties that are allowed (and their meanings) is beyond the scope of this document, but a complete description can be found at the W3C site here.

Support for specific MenuBackgroundProperties is highly browser dependent. Be sure to test your menus in a variety of browsers and platforms when using background image properties.

In order for MenuBackgroundProperties to be utilized, MenuBackgroundImage must be set. If MenuBackgroundImage is not set, then MenuBackgroundProperties will be ignored.

The scroll/fixed property of menu background images will be ignored by HierMenus (even though it is set by default). To set the scrolling status of the menu background image, use ScrollBackgroundImage instead.

When using background images, you will generally want to set your background colors (MenuBGColor and BGColor) to transparent, to ensure that the item and menu background colors do not overlay the menu's background image. Another tip is to set ScrollBackgroundImage to true, set BGColor to transparent, and then specify a valid MenuBGColor. When set this way, the background image will overlay the MenuBGColor. Those with image support in their browsers will see the image as you intended, while those without will see the MenuBGColor as the default menu item background.

As noted above, some browsers will not support image backgrounds at all, and therefore their menu text displays may not be appropriate. Creating a menu where the readability of the text is dependent on a menu background image is not recommended. You can, however, use the built in HM variable HM_BackgroundSupport in your configuration file to supply alternate color schemes for those menus that depend on background images:

BGColor:(HM_BackgroundSuppport)?"transparent":"black",
Note that HM_BackgroundSupport only indicates whether HM will support the application of background images to menus in the user's browser. It does not indicate whether or not the user allows images to be displayed within their browser.

Examples:
// Ok:
MenuBackgroundProperties:"repeat-x",
MenuBackgroundProperties:"left repeat-y",
MenuBackgroundProperties:null,
MenuBackgroundProperties:(window.showBack)?"left":"right",
    // if the user defined variable "showBack" is true,
    // use "left" positioning, else "right"

// Incorrect:
MenuBackgroundProperties:repeat-x,   // Strings must be quoted
MenuBackgroundProperties:"null",     // null must NOT be quoted
MenuBackgroundProperties:"ZigZag",   // only valid CSS values allowed
MenuBackgroundProperties:'(window.showBack)?"left":"right"', 
    // no quoted expressions
Default:
"scroll top left repeat"

See Also:
MenuBackgroundImage, ScrollBackgroundImage, ItemBackgroundImage, ItemBackgroundProperties



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Created: 3/25/2004
Updated: 3/25/2004
URL: http://www.hiermenuscentral.com/documentation/reference/menubackgroundproperties.html