Results 1 to 2 of 2

Thread: Centering Drop Down Menu

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

    Default Centering Drop Down Menu

    I'm new at this and have looked over and haven't found the answer to this question.

    I'm working on the drop down menu at

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

    I want to center the actual down down menu box not the text when you click on the image. Is this possible?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If I understand you, you want to center the content that drops down from this menu. I think that would look bad but, it is your page. The way to do that is to find these two lines in the script:

    Code:
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    change them to this:

    Code:
    dropmenuobj.x=75
    dropmenuobj.y=20
    the x is how many pixels from the left the drop down will be, the y is how many pixels down it will appear. These values worked for the example on the developer's view page. You may have to adjust them to get the effect you want with your menu. Just as an explanation, the way the code is without these modifications allows these drop downs to appear adjusted for where the were called from on the text links.

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
  •