screen position not correct

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
mike.saunders@ntlworld.co
Beginner
Beginner
Posts: 2
Joined: Sun May 19, 2002 7:23 pm

screen position not correct

Post by mike.saunders@ntlworld.co »

I have the menu working fine in ie but in mozilla or netscape the position of the menu has shifted quite a bit.

any ideas

cheers Mike
dmurphy52@lycos.com
Beginner
Beginner
Posts: 1
Joined: Sun May 19, 2002 7:24 pm

Re: screen position not correct

Post by dmurphy52@lycos.com »

i was going to point you to a post in the old forum that had the answer, but i see yadin has deleted it.

I'll hunt about for the code i added to fix this problem.
It involves adding an if statement and extra variables to one of the menus functions.

I'll post up the code as soon as i find where i put it.

Neil
saladpuncher
Beginner
Beginner
Posts: 8
Joined: Sun May 19, 2002 8:23 pm

Re: screen position not correct

Post by saladpuncher »

ok, this is for version 3.2.5 - NOT the 3.3 beta version (although it probably will still work)

in the mmenu.js file in the function dmenu(mnu){ ..about line 325-330ish
add the following code:

if(ns4){ ...
change the line mt="...." to
mt="<layer z-index=90 visibility=hidden bgcolor=#" bgc " id=" mnu " top=" (menu[1] XX) " width=" thw " left=" (menu[2] YY) ">"
where the XX and YY are the pixel numbers you want to shift by (8 and 3 are usually ok).

then in the next part:

else{ iedf=""; ......
change the line mt "...." to
if (!document.all||ns6||opera){
mt="<div id=" mnu " style=\"" iedf ";z-index:90;visibility:hidden;" brd "position:absolute;background-Color:#" hlp[4] ";width:" (menu[3] ns6w) "px;left:" (menu[2] YY) "px;top:" (menu[1] XX) "px;\">"}
else{
mt="<div id=" mnu " style=\"" iedf ";z-index:90;visibility:hidden;" brd "position:absolute;background-Color:#" hlp[4] ";width:" (menu[3] ns6w) "px;left:" menu[2] "px;top:" menu[1] "px;\">"}

again where XX and YY are the pixel amount you want to shift the menu by, 8 and 3 again for example)

Hope you understand and hope this helps.

Neil
postmaster@laby.kentdirec
Beginner
Beginner
Posts: 1
Joined: Sun May 19, 2002 7:24 pm

Re: screen position not correct

Post by postmaster@laby.kentdirec »

Thanks Neil!!

Worked like a dream

Mike
Post Reply