set position of the menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
agerszt
Advanced
Advanced
Posts: 11
Joined: Wed Aug 20, 2003 6:55 pm

set position of the menu

Post by agerszt »

hi

the menu of the sample download always is left (horiz) and centered (vertically). i couldn't find a way to align it differently. i searched the
faq, but couldn't find any pointers.

what is the proper way to put it there, where you want it? :)

thanks,
arie
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Take a look at http://milonic.com under DHTML Menu > you will see
-Style Properties Quick Reference http://milonic.com/styleproperties.php
-Menu Properties Quick Reference http://milonic.com/menuproperties.php
-Menu Item Properties Quick Reference http://milonic.com/itemproperties.php
Check to see if you can figure out how to do what you want using these listed properties, and also look in the samples menu, you can pretty much see what properties are set for each of the menu's that are shown. Once you look at these and STILL can't see how to do it, post back.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
agerszt
Advanced
Advanced
Posts: 11
Joined: Wed Aug 20, 2003 6:55 pm

again me :)

Post by agerszt »

i've read the document and tried

with(menuStyle=new mm_style()){
screenposition="top;left";
onbgcolor="#4F8EB6";
oncolor="#ffffff";
offbgcolor="#DCE9F0";
offcolor="#515151";
bordercolor="#296488";
borderstyle="solid";
borderwidth=1;
separatorcolor="#2D729D";
separatorsize="1";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
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)";
}

--> the sample file with the added screenposition

gives that result: http://www.irdium.ch/menus/index.html

the menue is still left, middle.

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

Post by John »

I get a 404 trying to go to that link.
John
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Gotta look and read alittle closer 8O ...there is no screenposition property that is available for a style. It is a menu property. Try putting it in there and see if that works. Good luck. ;)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
agerszt
Advanced
Advanced
Posts: 11
Joined: Wed Aug 20, 2003 6:55 pm

3rd try

Post by agerszt »

ok. i've added it that way (in menu_data.js)

_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=45 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=40 // Follow scrolling Rate
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
screenposition=top
_screenposition=top

with and without underscore: no luck.

the link is working fine btw: http://www.irdium.ch/menus/index.html
(be sure it is irdium not irIdium :)

it should be so simple to put that nice nifty thing there where you want it. but it seems no luck to me today.

thanks for help
arie
agerszt
Advanced
Advanced
Posts: 11
Joined: Wed Aug 20, 2003 6:55 pm

finally got it :)

Post by agerszt »

//top=220;
//left=10;

needs to be removed...
agerszt
Advanced
Advanced
Posts: 11
Joined: Wed Aug 20, 2003 6:55 pm

follow up

Post by agerszt »

if you put two different menus on the same page (which works) and i align one to the left and the other to the right, the menus get streched quite unnicely. is that inevitable?

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

Re: 3rd try

Post by John »

agerszt wrote:ok. i've added it that way (in menu_data.js)

_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=45 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=40 // Follow scrolling Rate
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
screenposition=top
_screenposition=top

with and without underscore: no luck.
Because it's still in the wrong place :!: Apparently Dave's advice ("read") didn't kick in. Just because you put something in anyplace in menu_data does not make it a menu property.

Look more closely at your data file (can't give you specifics because I can't get at it). You will see something like...

Code: Select all

with(milonic=new menuname("XPMain")){_c=1 etc.
XPMain will be whatever you have named your menu. That is a menu definition, and menu properties (e.g., screenposition) go in there.
agerszt wrote:the link is working fine btw: http://www.irdium.ch/menus/index.html
(be sure it is irdium not irIdium :)
No, it's not. I get...
Cannot find server or DNS Error
As far as spelling is concerned, we just click on what you type in (it's a hot link), so we're not making any typing errors.
John
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Ok, the link worked for me now (dont know if you changed something) but the menus loaded up correctly. Looking at your code, you wanted one to be in the upper left and the other in the upper right and thats where they lie. Nice job...those quick refs are going to become your best friend the more you work with the menu! ;) Thanks John.

Just another tip, due to a problem with your styles. There have been problems due to styles causing menus to mysteriously grow :? as you resize a page, and I see it on your upper right menu viewing in my IE6 browser. Haven't played with it enough to nail it down to a specific thing, but here are a couple things to change to keep it from happening to your menu. You have one style defined for all your menus. This style defines a overfilter that includes a FADE. A fade only works for menus that actually have transitions (open/close) and since you're top most menus are alwaysvisible, they shouldnt have fade. You should either take out fade, or copy that style, rename it, take out the fade and make your top menus us the new style (the one without the fade). This might help. Also, your shadow strength may be set too high, its at 5 right now, drop it to 4 or 3 and see if that helps.
Best of luck! ;)

Oh and John, you kinda do work for milonic now, in a round-about, long-distance, indirect way, hehe. :lol:
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Hergio wrote:Oh and John, you kinda do work for milonic now, in a round-about, long-distance, indirect way, hehe. :lol:
So do you, Dave :!: Wonder where the check is... :?
John
Post Reply