submenu weirdness in IE

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
crunchland
Beginner
Beginner
Posts: 5
Joined: Mon Nov 13, 2006 5:39 am

submenu weirdness in IE

Post by crunchland »

I'm sure I'm overlooking something. I did a search on the board and didn't find anything similar.

My menu works fine in firefox, but not in IE6. The url is http://crunchweb.net/nixon/example.htm -- I've tried tinkering with the z-index to no avail.

The code can be found at http://www.crunchweb.net/nixon/scripts/menu_old.js

Thanks in advance for your assistance.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

See the following links. These apply to relatively positioned menus which you are doing since you want them to be positioned in that div.

http://milonic.com/menusample9.php

http://milonic.com/tablemenu.php


One other thing, you have rawcss= in the menu definition, as far as I know that is not a menu property and doesn't do anything if it's put there. Below my name are links to style, menu and item properties lists so you can see where various things can be used.

If you want to change the padding in the main menu but not in the others, I suggest you put the rawcss in the menuStyle and then create a second style for the submenus. You could do it by copying the menuStyle, pasting it and renaming it to subStyle, then eliminate the rawcss= part of it and assign the subStyle to all the submenus.

Hope this helps. If you need more help, just post back.

Ruth
crunchland
Beginner
Beginner
Posts: 5
Joined: Mon Nov 13, 2006 5:39 am

Post by crunchland »

re: rawcss ... that may be there just out of desperation. I think I was trying to see if explicitly declaring a z-index code would work, and I neglected to take it back out when it didn't.

Thanks for the clue about tables and divs. I probably never would have figured that one out.
crunchland
Beginner
Beginner
Posts: 5
Joined: Mon Nov 13, 2006 5:39 am

Post by crunchland »

Well, while I still have more tinkering to do, the issue doesn't seem to have been directly related to not embedding the code the way those links you provided demonstrate. Ultimately, I took the code straight from this site, and put it on my test page, and still had the problem. So I concluded the problem was somewhere else. I ended up cleaning up my style.css file and adding one more z-index command, this time in the menu declaration, and giving it the highest value of all, 10. The problem cleared up.

Why it was working in Firefox but not IE, I can't begin to figure out.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I don't know. I do know that when I took your main menu from the data file, put it in it's own file and set position="relative"; and then called that main data file in the div while calling the other files right after the body tag as required the problem went away.

You should have to do anything about z-index, the menu z-index is something like 999

Ruth
crunchland
Beginner
Beginner
Posts: 5
Joined: Mon Nov 13, 2006 5:39 am

Post by crunchland »

I just doublechecked, and removed the z-index declaration for the #menu div in my css, and the problem returned. Replacing the z-index declaration, and the menu functioned correctly. (shrug)

Now I just have to figure out why the submenu is opening 100 pixels below the main menu.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Try this and see if it's correct in your browser. When I go it looks ok in IE5.5, FF1.0.2, Netscape 7.51, Opera 7.54 win98 resolution 800x600 and on IE6, FF1.5.08 winXP resolution 1024x768. I don't have the newer NN, and Opera on the new computer so can't test those.

EDIT: Link Removed

Let me know when you get this so I can remove the stuff. Also, I put everything in one folder so if it works you'll have to change links back :)

Ruth
Last edited by Ruth on Thu Nov 30, 2006 11:00 pm, edited 1 time in total.
crunchland
Beginner
Beginner
Posts: 5
Joined: Mon Nov 13, 2006 5:39 am

Post by crunchland »

Hi Ruth. It's been so long, not sure what I ended up doing to fix it, but it's fixed. It was solved by the z-index, and that's good enough for me. Thanks for your help.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

You're welcome :)

As long as it works, that's the ticket!

Ruth
Post Reply