Length of page change when menu added/appear

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Length of page change when menu added/appear

Post by kgp43 »

Hi all,

I have a problem. The length of my page change when I add the menu - it works perfect without the menu.


Link:
http://www.tackleprices.com/merchant/


This is my code (hope it is enough):
_menuCloseDelay=400 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=130 // 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



with(menuStyle=new mm_style()){
align="left";
onbgcolor="#333333";
oncolor="#66CCFF";
offbgcolor="#CFDBEB";
offcolor="#000000"; // Text colour
bordercolor="#000000";
borderstyle="solid";
borderwidth=1;
separatorcolor="#999999";
separatorsize="1";
separatoralign="right";
separatorwidth="100%";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#999999";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="http://www.tackleprices.com/merchant/menu/arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=100)";
outfilter="randomdissolve(duration=0.2)";
}

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=100;
left=0;
menuwidth="100%";
menualign="center";
alwaysvisible=1;
followscroll="1";
orientation="horizontal";
aI("text=Home;url=http://www.tackleprices.com/merchant/;");
aI("text=Brands;showmenu=Brands;");
aI("text=Series;showmenu=Series;");
aI("text=Products;showmenu=Products;");
aI("text=Prices;showmenu=Prices;");
aI("text=Statistics;showmenu=Statistics;");
}
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You are way downlevel in the code you are using. You have RC38, current is v5.20a (probably 5.21 by the time you read this). That means you are, literally, at least 35-40 versions back! Your version is no longer supported.

Update at http://milonic.com/, try it again, and come on back if you're still having a problem.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

John's right, you really need to upgrade. Also, when you do that and let us know, let us know which browser is making the page get longer with the menu on it.

Ruth
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

Rofl, It is only 9 months old... or so
Alot happens lately :P
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

Okay, the span in the bottom of the page seems to be gone now (after the update). But I have another problem: The submenues seems to close before I get the chance to use them... hard to explain. Try it for yourself

Link: http://www.tackleprices.com/merchant/
Try this (a couple of times if you dont get the error the first time): Products > Add Products > Tackle > Lines or Lures (your choice).
- if you get the error then you cant click the "lines" or "lures", it simple disappear.


My new code:

_menuCloseDelay=400 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_subOffsetTop=0 // Sub menu top offset
_subOffsetLeft=0 // Sub menu left offset


with(menuStyle=new mm_style()){
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="http://www.tackleprices.com/merchant/menu/arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=100)";
outfilter="randomdissolve(duration=0.2)";
}

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=100;
left=0;
menuwidth="100%";
menualign="center";
alwaysvisible=1;
orientation="horizontal";
aI("text=Milonic;url=http://milonic.com/;");
aI("text=Home;url=http://www.tackleprices.com/merchant/;");
aI("text=Brands;showmenu=Brands;");
aI("text=Series;showmenu=Series;");
aI("text=Products;showmenu=Products;");
aI("text=Prices;showmenu=Prices;");
aI("text=Statistics;showmenu=Statistics;");
}
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Remove the coding from the div and put it either in the head or the first thing after the body tag before anything else. It doesn't like being in a div. I tested and it works in IE5.5, Netscape 4.79,6, 7.1, Opera 6.05, Firebird .07. There's a problem with Opera 7.11. It shifts the menu to the left. To fix that add screenposition="center"; where you have the menuwidth= and menualign=

Ruth
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

That is superb :D working great

Another thing (hope it is okay). I removed the shaddow, but then the submenues (and sub-submenues) dosen't have the original possition anymore. Is it possible to remove the shaddow without changing the possition of the sub-/submenues?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I don't know what you mean about removing the shadow, you didn't have a shadow in the page I downloaded and checked. The only thing that file showed was overfilter="fade and alpha. Anyway, to set the submenus, at the top of the menu_data.js file is the_subOffsetTop and Left, just set them at whatever pixels you want. I'd start with =3 and go from there.

Ruth
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

That part worked great, thanks :)

Do you know how I add span between the menu and the first submenu?
Illustrated in the pic below:

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

Post by Ruth »

Yes. it's the same place you set it before. _subOffsetTop will move the top of the submenu away from the main item, so just put in numbers until you get it where you want it. Try starting with 10 and increase it. _subOffsetLeft moves the submenu toward the right from the item it comes off if set to positive and moves it toward the left if it's set as negative, i.e. -10 would move the submenu 10 pixels toward the left.

Ruth
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

It only move the last submenues, not the first once (see picture)

This is my settings so far and they only move the last submenues.
_subOffsetTop=10 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

In the submenu menu style just above the items you can also use
left="offset=-?px";

replace ? with whatever number.
maybe that will help.

maz
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

Maz wrote:In the submenu menu style just above the items you can also use
left="offset=-?px";

replace ? with whatever number.
maybe that will help.

maz
Can't get that part to work - nothing happens
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

Isnt there some kind of code to use to set the first span (between the menu and the FIRST submenu)? I just want to make a 5px span, so the first "drop-down" dosent appear right below the menu
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I just tried it and it works in Netscape, IE, Opera, Firebird. Check your code for correct " and ; It gets inserted into each submenu that is from the main menu showmenu, not into the next level ones, they will work with the subOffset amount you put in the top of the file.

Code: Select all

with(milonic=new menuname("Brands")){
style=menuStyle;
top="offset=3";
overflow="scroll";
I set it to 3, 5 looked like it moved too far down.


Ruth
kgp43
Super Advanced
Super Advanced
Posts: 30
Joined: Sat Jan 10, 2004 5:49 pm

Post by kgp43 »

Ruth wrote:I just tried it and it works in Netscape, IE, Opera, Firebird. Check your code for correct " and ; It gets inserted into each submenu that is from the main menu showmenu, not into the next level ones, they will work with the subOffset amount you put in the top of the file.

Code: Select all

with(milonic=new menuname("Brands")){
style=menuStyle;
top="offset=3";
overflow="scroll";
I set it to 3, 5 looked like it moved too far down.


Ruth
Sorry about that. I added it the wrong place :P
It works fantastic (I just changed in from 3 to 4).

Thats again :D
Post Reply