Absolute positioning menus on image map

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
cdearmond
Beginner
Beginner
Posts: 4
Joined: Sat Jul 31, 2004 4:01 am

Absolute positioning menus on image map

Post by cdearmond »

Hello! Need a bit of advice about positioning the menus on an image map. I have the menus working beautifully, but in order to use absolute positioning, I'm using the "top" and "left attributes in the menu_data file. I just realized that these attributes are for the screen, not for the image map areas. So if the image were moved to another area on an htm page, the menus would still appear at the top/left areas of the screen instead of following the image.

Is there another way I could do absolute positioning in relation to the image instead of the screen?

Thanks very much in advance. Here's my test page so far:

http://www.accd.edu/sac/lrc/librns/celi ... n/menu.htm


Celita
cdearmond
Beginner
Beginner
Posts: 4
Joined: Sat Jul 31, 2004 4:01 am

partial fix

Post by cdearmond »

OK, I solved part of the problem by just designating the "top" of each menu at 100. This matches with the bottom of each image map hotspot I'm using to launch the menu.

Here's a snip of code for that top positioning:

with(milonic=new menuname("Resources")){
style=MapSample;
borderwidth=1;
top=100;
aI ...
}

I'd still like to know if there is another parameter I might use to position the menu based on the absolute image map coordinates instead of relying on screen position...?

I've also provided a link back to Milonic at the bottom of the page.

http://www.accd.edu/sac/lrc/librns/celi ... n/menu.htm

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

Post by John »

top= and left= are used for positioning.

See http://milonic.com/forum/viewtopic.php?t=2981 for more help.
John
cdearmond
Beginner
Beginner
Posts: 4
Joined: Sat Jul 31, 2004 4:01 am

Post by cdearmond »

Thanks, John. All useful information.

I'll continue digging to see if there is an alternate positioning technique other than the top/left parameters. I would like to base the left edge of the menu not on screen position, but on hotspot position.

I know that ('menuname',1) allows the menu to drop down at the mouse coordinate...which is fine, but if there is a way to put that left edge absolutely...

Still flailing a bit, but I'm sure I'll figure something out.

I just received an OK from Milonic on my free academic license. Exciting!

cheers,
Celita
Post Reply