Menu Always On Top Problem [Solved]

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
rbester
Beginner
Beginner
Posts: 2
Joined: Sun Jun 24, 2007 2:59 pm

Menu Always On Top Problem [Solved]

Post by rbester »

Trying to use an AJAX image viewer, however the menu always appears on top of the enlarged image, obstructing its view. Tried to play with the z-index of the image viewer but with no success.

Example here: http://www.aspect-ai.com/technology.php (click the lemon)

The original image viewer is from here: http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

Anyone here has an idea for a solution?
Last edited by rbester on Mon Jul 23, 2007 1:26 pm, edited 1 time in total.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Just tried it with IE7 and the menu appeared behind the image.

We've had this problem in the past with Lightbox running under the Prototype JS Library and the fix is to reduce the default Z-Index of the menu.

You can do this by adding zindex=99 to the main menu definition. You'll need to play around with the value but this should solve the problem.

HTH,
Andy
Last edited by Andy on Mon Jun 25, 2007 7:01 pm, edited 1 time in total.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I downloaded your page and put the original viewer on it with all those files and with a z-index change in that thumbnail.css file it worked and sat the image over the menu. In the thumbnail.css file the outermost div z-index sets at 1000.

EDIT: Do what Andy posted :)

Ruth
rbester
Beginner
Beginner
Posts: 2
Joined: Sun Jun 24, 2007 2:59 pm

Post by rbester »

Hi,

Ok, looks like it is working now. Here is what I learned - the first tip I found was to add the following magic code to the page:

Code: Select all

<!--[if IE]>
<style type="text/css">
#lightbox, #overlay {
z-index:10000!important;
}
</style>
<![endif]-->
It made the trick for IE but not for any other browser. Now I came back here and found Andy's "zindex=XX" advice and gave it a try. Voila! Problem solved (with "zindex=55".) Thank you guys! :)
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Great!!!

Good to hear that it worked
Post Reply