Results 1 to 2 of 2

Thread: Anylink Drop Down Menu Width Problem

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

    Default Anylink Drop Down Menu Width Problem

    1) Script Title: Anylink Drop down Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem:
    I'm using this menu and it's working great, but there's an issue with the width. We are passing in variables for the menu items, and users can create their own menu items, so one item may be one word and one item maybe be 5 words. I have to set the width, but when someone adds a longer item to the list, it wraps the text. Doesn't look good. Why wouldn't it just resize for more width space? or can i set it that way? I tried doing width="100%" and in IE it doesn't work. Can anyone help?

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

    Default

    When someone adds a longer item, is that to an existing menu with a "width" already defined, or a whole new menu? Either way, you can change the drop down menu's width dynamically by calling:

    Code:
    document.getElementById("dropmenudiv").style.width="new_width_in_px"
    You'll still need to know what explicit value to enter for the new width based on what the user is adding inside the menu, however.

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
  •