1 reply [Last post]
adamweyant
Offline
newbie
Last seen: 13 years 6 weeks ago
Joined: 2006-05-05
Posts: 7
Points: 0

So I'm using someone else's script for the dropdown menus I'm using on my site, but it's making the menus drop down in the wrong place... I don't know much about java, but I was able to decipher it to the point that I think is the problem:

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

The menus now drop down 2/3 of the way down the screen and 2/3 of the way across. I've had one person (who also knows nothing about javascript) say that it might have something to do with centering issues, which would be at the html level.

http://www.geocities.com/boyscouttroop49/index2.html

http://www.geocities.com/boyscouttroop49/dropdown.js

Yes, I know geocities is bad. Yes, it's getting a real domain. Probably as soon as I finish this.

Any help is much appreciated.

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 45 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Use pure CSS dropdowns

Use pure CSS dropdowns rather than this along with a small csshover.htc file to provide functionality in IE6 and below, something like suckerfish or the Multi Level Menu offering on this forum.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me