position of submenus using Opera 5 - Mac platform

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
takema
Beginner
Beginner
Posts: 3
Joined: Wed May 05, 2004 5:41 am

position of submenus using Opera 5 - Mac platform

Post by takema »

First of all: your site is awesome. I'm learning a bit of JS.

So moving on to my question:

I modified Horizontal Menu v 5.1 so that now it is a vertical menu by removing
"position=horizontal'

Position of main menu and submenus seem fine when tested using Mozilla 1.2.1 and Explorer 5. However, in Opera 5, the submenus are running out of the right edge of the page (main menu is located in the usual place: left side of page). To bring it in, I have to change

_subOffsetLeft=-3

to

_subOffsetLeft=-400

(Yikes!!! )

This change from -3 to -400 means that, in the other 2 browsers, the submenus have moved to the left edge of the page which makes it visually awkward.

Is there a way to make all 3 browsers happy?

(I don't have a website. I'm just using this in my Mac G4 (OS 9).)

Thanks.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You mention you're running v5.1, which is down-level. You'll need to upgrade to the current v5.15.

We'll need to see the code. Post the relevant parts of your HTML (anything that has to do with the menu) and your _data file here using the [code][/code] tags.
John
takema
Beginner
Beginner
Posts: 3
Joined: Wed May 05, 2004 5:41 am

Post by takema »

HTML code calls your JS in the head section. There is nothing in the body that refers to the menu.

I'll next paste what I've changed or added to the menu_data.js file (none of the other files have been altered in any way).

1. added itemwidth="40";

in this function

with(menuStyle=new mm_style()){
onbgcolor="#FFBA51";
oncolor="#FFFFFF"; //original ffffff use to check proper loading
offbgcolor="0";
offcolor="#FFBA51";
padding=10; //use 10
itemwidth="40";
align="left";
fontsize="100%";
fontstyle="bold";
fontfamily="ArialMT, Verdana, Tahoma";
pagecolor="black";
pagebgcolor="#CCFFCC"; //99CC99
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
}


2. removed orientation="horizontal";
3. changed top=10;
left=10;

in this function

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=160;
left=5;
alwaysvisible=1;
//orientation="horizontal";
aI("text=Home;url=http://milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=MyMilonic;");
}

Thanks for the help!
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

subimage has no value, remove it if you are not using it, including subimage padding.

offbgcolor needs a proper value.

remove the quotes on numeric values ie itemwidth

Use the links below to help on styles, and try to remove styles you are not using. The cleaner the code the more likely it will behave in all browsers.

maz
takema
Beginner
Beginner
Posts: 3
Joined: Wed May 05, 2004 5:41 am

Making the menu transparent

Post by takema »

Good point -cleaned it up

Regarding offbgcolor:

To have a transparent background, I thought I read someplace that the value for offbgcolor should be set at 0. If this is incorrect, how can the menu be set to be transparent so that an underlying image shows?

Once again, thanks!
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Simple use "transparent" ;)

0 won't work.

maz
Post Reply