View Full Version : AnyLink Drop Down Menu -- Help with Placement

08-20-2007, 11:37 PM
1) Script Title: AnyLink Drop Down Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

3) Describe problem: I simply want to be able to specify how many pixels the drop down menu offsets from the top and the left of the anchor that it's being assigned to. I've trying playing around with it myself, but while I seem to be able to get it to function in IE, it simply doesn't work at all in FireFox.

I'm going insane trying to get this to work. Help, please! :confused:

08-21-2007, 01:02 AM
You can manually add to the default offsets of the drop down relative to the anchor link, though if the gap becomes too wide, the menu most likely will disappear before the user's mouse gets to the drop down menu in time (from the anchor link). With that in mind, find the lines:

dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+5+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+5+"px"

The code in red is new, and adds 5 pixels both to the left and top offsets.