Latest version of menu ignores ONCLASS/OFFCLASS???

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Latest version of menu ignores ONCLASS/OFFCLASS???

Post by vikenk »

Hello everyone,

Boy, have things changed since I was last in here! Ruth, John, it's good to see you're still in here!

I just updated my menu version from 5.773 to 5.787 (latest). I've updated the menu with little-to-no trouble in the past but this time it's different. I partially style my menu with css in my style sheet. I use the onclass and offclass variables to link to the style in my style sheet. I have been doing it this way ever since I got the menu.

When I updated to ver 5.787, the menu seems to be completely ignoring my styles. No matter what I change in the style sheet, it does not make any difference in the menu. I've kept the my standard menu_data.js file and updated the mmenudom and milonic_src files, like I have always done in the past.

Has the onclass/offclass support been dropped? No more linking to css files? I've looked through the menu version page and can't seem to find any mention about dropping the css support.

Thanks!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by Ruth »

Hiya stranger!

No there has been no change, the menu still supports css. Have you got a link so I can see what's up? I need to know what in the css is not working, is all the class not working or just some of the things?

Milonic has been working on the next generation menu, hopefully it will be in testing soon. It's sounds great.

Ruth
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by vikenk »

Hello Ruth!

Ok, I've managed to setup an example for you even though the site is still in development. I've uploaded a bare-bones page for you to see the difference. I've stripped down all code and all css styles to limit them down to whatever is necessary for the menu. I've removed all competing javascripts. So, all there is in the style-sheet is the menu style and all there is on the webpage is the menu code and nothing else.

http://www.vikenk.com/test/old_menu.html

http://www.vikenk.com/test/new_menu.html

The only difference between the two menus here is the updated mmenudom.js and milonic_src.js files. Everything else is identical. The new menu completely ignores my onclass/offclass commands. I have been updating the menu this way ever since I started using the menu. I keep my menu_data.js file and I update the source-code files. It has always worked for me.

By the way, there is a slight difference between IE6 and FF. In FF, the new menu is bunched to the left. In IE6 it is still centered.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by Ruth »

Hi,

OK, I don't know what has changed. I'm not much on css, but it looks like you are applying your css to the table, and until this version the menu was using that. You can get it to look the same doing the following, and I'll post this to Milonic.

In your the menuStyle add

Code: Select all

padding=3;
valign="top";
subimagepadding=2;
In the style for the subs called sub, add padding=3;

This would be your main menu

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
position="relative";
orientation="horizontal";
margin=0;
menuwidth="100%";
menualign="center";
itemwidth="100%";
aI("text=Home;url=index.html;");
aI("pointer=default;showmenu=About;text=About...;");
aI("pointer=default;showmenu=Information;text=Information;");
aI("pointer=default;showmenu=Pictures;text=Pictures;");
aI("text=Calendar;url=calendar.htm;");
aI("pointer=default;showmenu=Store;text=SNDC Stores;");
aI("text=Guest Book;url=guest_book.htm;offclass=last;onclass=last;");
// aI("text=Site index;url=javascript:mm_siteIndex('top=0,left=0,height=768,width=1024','Milonic Site Index');"); // Use only when generating Site Map
}

drawMenus();
and the css class you are calling for that last item, which is really to make it spread out like the Home one is

Code: Select all

.last{padding-top:0px;padding-right:15px;padding-bottom:3px;padding-left:3px;text-decoration:none;vertical-align:top;}

I will report it, but what I gave above makes it look pretty close to what you have. The menualign="center"; makes FF stop putting it at the left, however, for some reason FF doesn't seem to accept the itemwidth="100%"; and spread the items out.

It's nice to see you, have a great Christmas :)

Ruth
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by vikenk »

Ruth,

Thanks for the advice. I'm not sure that I will go with the latest version, though, if I can't style it with CSS. :>( I see that you mention to create a style for the last item in order to make it render like the first rest. This has been a problem with the menu for some time :>(

The menu still does a poor job of evenly spacing the menu items when the menuwidth and itemwidth are set to 100%. That's why I like to use the CSS styles to set menu width, because it was more reliable. I posted on this long ago, do you remember? I see that it hasn't been fixed yet, though. Here's the post, just to refresh your memory:

viewtopic.php?f=10&t=8093

In that original post, I bring up the topic that the menu does not evenly space its self well, always leaving the last menu item "squished". I see that it hasn't been fixed yet, though.

I'll apply your suggestions and see if I like the way it looks and then I'll take it from there :>) I really love this menu, but I find it had to believe that it can't space and center evenly.
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by vikenk »

Ruth wrote:
and the css class you are calling for that last item, which is really to make it spread out like the Home one is

Code: Select all

.last{padding-top:0px;padding-right:15px;padding-bottom:3px;padding-left:3px;text-decoration:none;vertical-align:top;}

I will report it, but what I gave above makes it look pretty close to what you have. The menualign="center"; makes FF stop putting it at the left, however, for some reason FF doesn't seem to accept the itemwidth="100%"; and spread the items out.

Ruth
Ruth, I'm not sure where I should put this code? I tried putting it in the stylesheet but it's not doing anything?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by Ruth »

Hi,

You put it in the stylesheet and then make the aI the following. Note the non-breaking line space. For some reason without that the item is wrapping.

Code: Select all

aI("text=Guest Book;url=guest_book.htm;offclass=last;onclass=last;");
Links Removed:

Let me know when you're done so I can remove it, since it uses your program files :)

As you can see it does use the off/on class, so I think it might be the particular css you are using, i.e. the table. Since I don't do much css, I'm not up on the # and such for setting up the codes and haven't yet found a good basic step by step tutorial on css.

Ruth
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by vikenk »

Ruth,

OOPS! I totally forgot to reply to this post. I grabbed the code from your example site. You may remove it now, if you haven't done so already.

Have you reported this to Andy? Did he have any response as to why it wasn't following my css styles?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Latest version of menu ignores ONCLASS/OFFCLASS???

Post by Ruth »

Hi,

I did report it. I will post again to him since we haven't heard. I think he's deep in the final setup for beta of the next phase Version 6 of the menu. Usually he responds pretty quick.

Ruth
Post Reply