PDA

View Full Version : Anylink Dropdown Menu - Positioning help?



JohnnyW
04-23-2007, 04:40 PM
AnyLink Dropdown Menu
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

Hi! I'm having difficulty positioning the Anylink Dropdown menu near the link it's attached to. I think it might be because of my absolute positioning, but I'm not sure. If anyone can help I would be extremely grateful!!

You can see what I'm talking about here on the SERVICES and THE TEAM links.

http://www.thunderpeel2001.com/JHM/JHM/index.html

Damned annoying since I'd just gotten it to look how I wanted it to!

Thanks for any help (I'm thinking the code/website might need some fairly major changes for it to work?).

- Johnny

PS - Sorry, I looked over the past few pages for an Anylink Dropdown Menu thread, but couldn't find one?

boogyman
04-23-2007, 05:07 PM
if you take out those absolute positioning then it will work fine.. the script comes with the positioning itself


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

references the function directly above it "clearbrowseredge" function


so take out the positioning parts of that script and leave the cosmetics

JohnnyW
04-24-2007, 09:59 AM
Genuis! Thanks for your help! I changed the code:


if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x+200+"px"
dropmenuobj.style.top=185+"px"
}

http://www.thunderpeel2001.com/JHM/JHM/index2.html

It's not 100% perfect, but it's 100 times better! It'd be great to be able to position each menu individually, but this seems to just about work!