View Full Version : AnyLink column alignment

06-18-2008, 04:08 PM
1) Script Title: AnyLink Drop Down Menu

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

3) Describe problem: Need to disable offset and can not figure it out.

Thank you for this great script. I've invested so much time getting this to work...weeks now due to my lack of skill, I'm sure...and now can not deal with the offset feature.

I know it is "cool" but it doesn't work for my purposes. Could someone let me know how to disable it? Something I can cut out of the script or alter in the style sheet? I've tried many drop down codes and this is the one that most closely does what I want...except for that offset feature. It does not seem to matter what size screen it is on...I have tested it on my large and small screen....the horizontal drop down just does not go straight down under the column ...i really need it to do that.

thanks in advance for any help.

06-18-2008, 05:20 PM
If you mean disable the menu from automatically dropping upwards or to the left when there isn't enough space at the bottom or ridge edge of the window, respectively, just remove the below lines of code in the script:

if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?

06-18-2008, 08:44 PM
ok... thank you for that. I tried it but no change. here is a page where you can see two things happening:


1. the menu is behind my applet
2. the menu drop down list is off to the right a few pixels.

I've looked for some help with layers....i think that is too complicated a way to go. Any insights?
I also tried modifyin the applet with <param name="wmode" value="transparent" /> from a post about that...no luck

06-19-2008, 06:31 AM
Well, the applet issue would be a different one than the one you had described above then. There are a few threads on the former on the forums as you have discovered already, but they're hit and miss depending on the applet. Simplest solution I can think of is just to replace the applet with a JavaScript equivalent, such as Fade in Slideshow (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm).

To the issue of the menu being off by a few pixels, this is normal in the sense that your menu links are inside table cells (<td>) that contain a border (the later that is). Since the drop down menu is positioned relative to the link itself, it appears as if it's off slightly horizontally, when in fact, it's due simply to the layout of your menu. A quick fix is to modify the below line inside the script to manually shift the menu by 2 pixels or so:

dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")-2+"px"

06-19-2008, 06:17 PM
Hey you...Thanks! Bravo!

I struggled with trying to make a drop down menu work in these pages and was delighted when putting them into table cells worked so well...I know, I know....get away from tables...but...I have never delt with layers or really, DHTML before...don't care for the math....(oh so that's why my dad sat up all night helping me with my math!) :D

I did see that java script but had read ad-nasium about this problem of order and did not realize there is a difference between using a java applet and using java script...I'm a "quick & dirty" coder as you can probably tell. Have learned so very much trying to get this all to work.

Menu looks and works great! Thanks!
Slide show - lots of code to cut and paste there but that's ok. Works just like my Anfy applet.:p