Center Offset Doing Funky, Funky Things

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
DMLCo
Advanced
Advanced
Posts: 21
Joined: Fri Sep 19, 2003 4:29 pm
Location: Houston, TX
Contact:

Center Offset Doing Funky, Funky Things

Post by DMLCo »

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: Select all

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
DMLCo
Solving the Challenges Where People & Technology Meet
Featuring DMLContent Content Management System
http://www.dmlco.com/
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

if you change this

Code: Select all

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
User avatar
DMLCo
Advanced
Advanced
Posts: 21
Joined: Fri Sep 19, 2003 4:29 pm
Location: Houston, TX
Contact:

Still Funky

Post by DMLCo »

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
DMLCo
Solving the Challenges Where People & Technology Meet
Featuring DMLContent Content Management System
http://www.dmlco.com/
User avatar
DMLCo
Advanced
Advanced
Posts: 21
Joined: Fri Sep 19, 2003 4:29 pm
Location: Houston, TX
Contact:

Answer Found!

Post by DMLCo »

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: Select all

popup('menuName')
and not

Code: Select all

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
DMLCo
Solving the Challenges Where People & Technology Meet
Featuring DMLContent Content Management System
http://www.dmlco.com/
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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