Results 1 to 5 of 5

Thread: AnyLink column alignment

  1. #1
    Join Date
    Jun 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question AnyLink column alignment

    1) Script Title: AnyLink Drop Down Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.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.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
    if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
    edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
    }

  3. #3
    Join Date
    Jun 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok... thank you for that. I tried it but no change. here is a page where you can see two things happening:

    http://www.nhland.com/Forest_Products.html

    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
    Last edited by gusgus; 06-18-2008 at 09:01 PM.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

    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:

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

  5. #5
    Join Date
    Jun 2008
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    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!)

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •