We are providing HierMenus to you at no cost. HierMenus code requires a confirmed membership with internet.com. Please register by clicking here and come back soon to download your free copy of HeirMenus code.
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

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

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

home / issues / issue #22

Issue:Opacity settings applied to menus incorrectly
Browser:Safari 1.1
Platform:Mac OS X
Description:Menus that are not supposed to have opacity settings may be displayed as if they do have opacity settings.
Cause:When attempting to set menus with differing opacity levels, such as a permanently displayed menu with 80% opacity which is supposed to display fully opaque child menus, remaining menus on the page are initially displayed with the opacity setting of the other menu. Safari evidently displays an element that appeara in a higher z-order with the opacity setting of the element beneath it (in z-order). This seems to be true even if the items themselves do not actually overlap (visually) on the page.

This is not a JavaScript issue; you can see the problem demonstrated yourself by viewing this simple sample page. On the sample page, a blue box and red box are defined. The blue box should have 60% opacity, while the red box should be fully opaque. Yet, because the red box is defined with a higher z-order than the blue box, it is also displayed with 60% opacity.

In HierMenus, we must display successive menus with higher z-order levels in order to ensure they appear above their parent menus. Note that if a menu is set with a specific opacity setting of less than 1.0, Safari will apply that opacity setting properly even if it does differ from the opacity settings of menus beneath them in z-order. To that end, one simple work around is to set all of your menus to a high opacity setting (like .99) by default, and then specifically set the appropriate menus to lower opacity settings. True, .99 opacity is not quite the same as 100% opacity; but visually it would be awfully difficult (if possible at all) to tell the difference; and the work around won't work with a value of 1.0 since Safari simply ignores that setting. Remember that you can set opacity conditionally, so that other browsers needn't be effected:

MenuOpacity:(HM_IsSafari)?.99:null;
And of course if you simply set all your menus to the same opacity setting you won't notice this problem in the first place.

This behavior was confirmed as a bug in Safari 1.1, and we'd like to thank Safari Developer Dave Hyatt for suggesting the simple work around. It was corrected in later Safari releases.

Posted:March 25, 2004

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Created: 3/25/2004
Updated: 1/10/2006
URL: http://www.hiermenuscentral.com/issues/22.html