Results 1 to 7 of 7

Thread: AnyLink Drop Down Menu

  1. #1
    Join Date
    Feb 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Drop Down Menu

    http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    i want the drop down menu to be center of the anchor link text.

    so i would like to move the menu to the left a bit or the right

    how would i do that? thank you

  2. #2
    Join Date
    Jan 2005
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Add text-align:center to dropmenudiv:

    #dropmenudiv{
    text-align:center;
    position:absolute;
    border:1px solid black;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    }

  3. #3
    Join Date
    Feb 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i want the menu to be centered from trigger link.

    the entire menu can be shifted left or right.

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

    Default

    Well, the line:
    Code:
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    within the script ultimately controls the left offset of the menu. You can add a number to it to increase its offset from the left edge of the link, for example:
    Code:
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+30+"px"

  5. #5
    Join Date
    Feb 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you. DD rocks. it is just simply what i was looking for.

    i have another question.

    menu1[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br>'

    i tried to include a pop up windows java script within <a href>

    menu1[0]='<a href="http://www.javascriptkit.com" onclick="NewWindow(this.href,'name','333','168','no');return false">JavaScript Kit</a><br>'

    do know any other method to embede a pop up windows with just specific width and height and no other properties such as url, scrolling etc...?

    target=_blank just doesn't cut.

    thanks.

    p.s. if i mouseover the trigger link for several times(3+), the error code on ie status bar reads:

    Line: 138
    Char: 1
    Error: Object doesn't support this property or method
    Code: 0
    Last edited by vfx; 02-17-2005 at 12:39 AM.

  6. #6
    Join Date
    Sep 2004
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I could be wrong, but I think you need to escape your single quotes. You're basically closing the string for the array element. Does anyone else have any thoughts?

  7. #7
    Join Date
    Mar 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Anyone got this working in MSIE for OSX?

    Anyone got this script working properly under OSX/MSIE... the first drop down works good, but then buggers up after that.

    PG

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
  •