Problem in IE: setting UL style.height in dropdown menu

Discussion in 'Javascript' started by e271828, Oct 23, 2006.

  1. e271828

    e271828 Guest

    Hello,

    The following code for a UL/LI dropdown menu works in FF, but not in
    IE:

    function menu_close(menu) {
    var menu_style = document.getElementById("menu" + menu).style;
    menu_style.display = "none";
    }

    function menu_open(menu) {
    var menu_style = document.getElementById("menu" + menu).style;
    menu_style.display = "inline";
    menu_style.position = "relative";
    menu_style.top = "-16px";
    menu_style.left="185px";

    parentmenu = document.getElementById("menu" +
    menu).parentNode.style;
    parentmenu.height = "16px";
    parentmenu.position = "relative";
    parentmenu.left = "15px";
    }

    function menumouseover(menu) {
    menu_open(menu);
    }

    function menumouseout(menu) {
    menu_close(menu);
    }

    --

    The parentmenu.style declarations in the menu_open(menu) function don't
    seem to be working. When I mouse over the UL, the series of LI should
    pop out to the left; their parent node (a UL) should have its height
    set to 16px and not expand to fit the series of LI's. I haven't been
    able to find an IE workaround to get the UL to remain at 16px and not
    expand to fit the LI's -- does anyone have an idea on how this could be
    done? To see the problem, go to http://masspolicy.org/newindex.php and
    move over the menu on the left in IE and FF. Thanks.
    e271828, Oct 23, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miguel Dias Moura
    Replies:
    3
    Views:
    4,277
    Bruno Sirianni
    Apr 3, 2004
  2. Mike
    Replies:
    1
    Views:
    792
  3. =?Utf-8?B?U3R1?=

    menu control setting indvidual style item

    =?Utf-8?B?U3R1?=, Nov 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    350
    =?Utf-8?B?U3R1?=
    Nov 10, 2006
  4. Ken Varn
    Replies:
    0
    Views:
    427
    Ken Varn
    Apr 26, 2004
  5. MyndPhlyp

    Setting <img> height to match <td> height

    MyndPhlyp, Dec 21, 2003, in forum: Javascript
    Replies:
    5
    Views:
    183
    MyndPhlyp
    Dec 22, 2003
Loading...

Share This Page