in IE 7

after displaying the first level of menu items correctly there is a bug in the second level. i think it is the old z-index problem but it is with the menu itself. see attached image.

Comments

carlomontagnino’s picture

to specify;

the top link in the second level shows (somewhat) correctly, but the rest of the menu tucks away under the first level.

jeffreyblove’s picture

Title: IE second level menu items » IE second level menu items - IE7?
StatusFileSize
new27.87 KB

I have a similar situation with IE7 except that my 3rd-tier menus forget to disappear (see attached). I've applied the fix for 3rd and 4th tier display (thanks cooperaj - http://drupal.org/node/65482).

For me, if you mousover to display the 3rd level then mouseout off the menu (rather than retracing your path back up the menu), the next time you hover over the top-level menu, you see all of the expanded <li> elements without the contained <a> elements. Sounds like an IE7 bug to me, but I'd love a css fix.

Cheers.

add1sun’s picture

Title: IE second level menu items - IE7? » IE menu levels "tucked under"
Version: 4.7.x-1.x-dev » 5.x-1.x-dev

@jeffreyblove, your issue with the disappearing a elements is a different issue than the one this thread is about. That is a duplicate of this issue: http://drupal.org/node/136702. Please continue the discussion there so we don't muddy up the issues we are trying to address.

Also, the partial covering issue that this thread is originally talking about also still happens in the current 5 dev version so changing version.

alexh’s picture

Component: Code » Browser Compat

Hello,
I had the same problem, in IE6 and IE7. I could fix it by adding this code into nice_menu.js:

window.onload = function() {
  if (document.all) {
    //add decreasing z-index to avoid overlapping of menu items
    var menuzindex = 1000;
    var menu = document.getElementById('nice-menu-1');
    var items = menu.getElementsByTagName('li');
    for (var i = 0; i < items.length; i++) {
         items[i].style.zIndex = menuzindex;
         menuzindex--;
    }
  }
}

If there is more than one nice menu, the same code has to be repeated for nice-menu-2, etc.

Additionally, to make it work in IE7, had to change line 35 in nice_menus.module from this:

drupal_set_html_head('<!--[if lt IE 7]>

to that:

drupal_set_html_head('<!--[if IE]>

Hope this helps. Maybe there's a nicer way...?

add1sun’s picture

Status: Active » Fixed

with all of the recent changes that have gone in, i'm not seeing this bug anymore. i'm marking this fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
Memeshift’s picture

confirmed fix.

works for me! Thank you so much!

Memeshift’s picture

Title: IE menu levels "tucked under" » Javascript fix for IE Nice Menu levels that are "tucked under"
mm63305’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

I'm bumping this because this issue is apparently not yet fixed. I am using the latest version of Nice Menus and I encountered the same problem in IE7.

The script mentioned in post #4 by alexh solved my problem.

Bricks and Clicks Marketing’s picture

I too had the problem with 6x-1.3 in IE 6 & 7, and fixed it with the script in #4.

keesje’s picture

Status: Closed (fixed) » Active

Seems to be a bug still in IE7 6x 1.3

rkdesantos’s picture

Related problem present in v5.x-1.4: http://drupal.org/node/288751

apratt’s picture

same problem though this is a select box with all the known challenges... maybe it's time to move on to another layout.

add1sun’s picture

Category: bug » task

I'm not going to address this in 6.x-1.x because I can't reproduce this problem locally. IE7 works fine for me in the core themes. Custom theme z-index issues are out of scope for bug reports and IE7 is no longer using JS at all, so this is a CSS issue. At most this should be a docs task to add to the handbook page if people need to use JS hacks to get their CSS working.

rkdesantos’s picture

@add1sun: I appreciate your thinking on this and why you don't want to address the issue in the code. However, I also agree that this does need to be documented somewhere (handbook page, readme, etc) since it appears to be a common problem for a lot of folks. I've seen it on multiple themes, multiple browsers, and two Drupal versions; and the solution in #4 works every time. Even a reference to this issue number in an accessible place would be valuable. For me, when I do a new Drupal site with Nice Menu, I'm tempted to just do this right up front to save lots of grief later. Thanks for listening.

matteoraggi’s picture

This fix look nice, but don't go for las stable nice_menus-6.x-1.3 because into file nice_menus.module there isn't the line drupal_set_html_head('

and also nothing of similar.
Do you have upgrated your script with nice_menu ?

tbertin’s picture

I edited my .js file as stated above in #4, but I'm still having this overlap issue in Firefox 3.0.11. It fixed the overlapping in IE7.

tbertin’s picture

StatusFileSize
new57.52 KB

Here's a screencapture. I'm using an unstyled Zen theme at the moment. I want to get this working properly before I start styling.

hellaswebnews’s picture

Hello,

my nice menus override my suckerfish dropdown menu.

I'm sure there is something simple that needs to be done to overcome this problem but i have blinded and cannot see it.

Can someone guided me to resolve this please?

Kind Regrads, Aris.

site: www.hellaswebnews.com

Fixed!!! :)

matteoraggi’s picture

Component: Browser Compat » CSS
Category: task » support
Issue tags: +suckerfish

With firefox to me it look to be all right, your site is very nice, I suggest you to advertise it here: http://drupal.org/node/448620
anyway to solve impagination problems you have to put hands on code of theme or nice menu code.

hellaswebnews’s picture

Assigned: Unassigned » hellaswebnews
Status: Active » Closed (fixed)

I fixed the issue. Item closed.

Anonymous’s picture

Component: CSS » Code

I have posted a patch for this issue here: #954092: IE7 z-index issue when menu wraps to multiple lines (separately as there are instructions over there on how to reproduce this problem in Garland without any customisations).

Please test so we can get this committed.

Anonymous’s picture

Assigned: hellaswebnews » Unassigned
Category: support » bug
Status: Closed (fixed) » Closed (duplicate)
Issue tags: +nice menus