Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:54

Center Offset Doing Funky, Funky Things


Poster: DMLCo
Dated: Tuesday December 2 2003 - 22:57:14 GMT

Hi folks!

Check out http://www.hipbrick.com/.

Mouse-Over PRODUCTS.

The menu should appear directly under the header. It doesn't for me. It appears about 30 px to the right. Until I resize the browser window, when it appears, lined up perfectly. Until I refresh, when it appears to the right. Until I resize the window, when it appears perfectly. Until I ...

Code:
with(cms_SubMenu=new mm_style()){
   offcolor="#333300";
   offbgcolor="#E0DABE";
   oncolor="#333300";
   onbgcolor="#FFFFFF";
   bordercolor="#000000";
   borderstyle="solid";
   borderwidth=1;
   separatorcolor="#000000";
   separatorsize="1";
   padding=4;
   fontsize=11;
   fontstyle="normal";
   fontfamily="Arial, Helvetica";
   align="left";
}


with(milonic=new menuname("SubMenu_3")){
   screenposition="top,center";
   top="offset=99";
   left="offset=-188";
   style=cms_SubMenu;
   itemwidth=90;
   aI("text=Bricks;oncolor=#FFFFFF;onbgcolor=#333300;offcolor=#FFFFFF;offbgcolor=#333300;fontweight=bold;type=header;");
   aI("text=Honeycomb;url=hipbrick.cfm?a=cms,c,2;status=Honeycomb;");
   aI("text=Big Block;url=hipbrick.cfm?a=cms,c,20;status=Big Block;");
}


Any ideas?

-Daniel


Poster: Ruth
Dated: Tuesday December 2 2003 - 23:40:21 GMT

if you change this
Code:
with(milonic=new menuname("SubMenu_3")){
         
         left="offset=-188";
         
to -215, it opens below in ie5.1 and opera 7, but in opera6 it's still off to the right and in NN 4,6,7 it's all the way top left no matter what you do with that offset. I don't know if there's something else that needs to be changed. But, that number works in ie and the newer version of opera.

Ruth

Still Funky


Poster: DMLCo
Dated: Thursday December 4 2003 - 14:15:15 GMT

Thanks, Innkeeper!

Unfortunately, that doesn't resolve the problem: the big issue is why it jumps around depending on whether you refresh or resize the window. Related, I would assume, is the fact that the measurement in pixels is only accureate on resize, not on reset.

Anyone have other ideas?

-Daniel

Answer Found!


Poster: DMLCo
Dated: Thursday December 4 2003 - 23:39:30 GMT

Hi folks ...

Just for closure ... Andy pointed me to the solution on this one. I was using the mouseover on an image to trigger the sub-menus, and was using the code

Code:
popup('menuName')


and not

Code:
popup('menuName', 'imgName')


Evidently, this matters: that is, by telling Milonic exactly what the sourse of the popup action is helps it calculate the position more reliably.

I don't understand quite why--the center of the screen is the same, regardless--but it does solve the issue, so I'm posting it here in case others either (a) run into the same problem or (b) can shed light on what specifying the second argument does.

-Daniel


Poster: John
Dated: Friday December 5 2003 - 20:06:53 GMT

Thanks for taking the time to put the fix up, Daniel. It's sure to help somebody.