Help with Javascript drop-down menu

Discussion in 'Javascript' started by Timmah1980, Sep 6, 2006.

  1. Timmah1980

    Timmah1980 Guest

    I'm sure this is a simple enough fix for someone out there, but I'm
    afraid it's beyond me!

    I'm putting together this simple menu for a client:

    http://www.timkeay.co.uk/mpc2/index.htm

    It works fine, but I'd like to make a couple of tweeks. As you can see,
    the sub-menus don't sit exactly in line with the header, so I'd like to
    shift them right by one pixel to correct this. I'd also like to shift
    them up one pixel, to remove the apparent double line between the
    header and the sub-menu, but this isn't as essential as getting them
    lined up properly.

    The two javascript files are here:

    http://www.timkeay.co.uk/mpc2/js/menu_var.js
    http://www.timkeay.co.uk/mpc2/js/menu_com.js

    Have posted this problem previously and had a kind reply from someone
    suggesting to start from scratch with a CSS-based menu. However, I'd be
    very grateful if someone could take a look at the actual javascript
    code and let me know how to fix it.

    Thanks a lot,

    Tim
    Timmah1980, Sep 6, 2006
    #1
    1. Advertising

  2. Timmah1980

    Tom Cole Guest

    FWIW

    In I.E. they do line up, exactly. In Firefox they're off 1 pixel. In
    Opera, they're missing the right and lower borders entirely.

    I.E. still constitutes over 60% of browsers (by most references, with
    some variation). Firefox makes up roughly 30%, the rest can fight over
    the 10 that's left...

    When you change your menu to shift one space to the right, it will now
    be offset in 60% of the viewers' eyes, not 30%. Shifting will not help
    the other 10% that are missing borders anyway. Your problem will be
    worse (as far as percentages are concerned), unless you mandate that
    your viewers use Firefox.

    That just my $.02.

    Timmah1980 wrote:
    > I'm sure this is a simple enough fix for someone out there, but I'm
    > afraid it's beyond me!
    >
    > I'm putting together this simple menu for a client:
    >
    > http://www.timkeay.co.uk/mpc2/index.htm
    >
    > It works fine, but I'd like to make a couple of tweeks. As you can see,
    > the sub-menus don't sit exactly in line with the header, so I'd like to
    > shift them right by one pixel to correct this. I'd also like to shift
    > them up one pixel, to remove the apparent double line between the
    > header and the sub-menu, but this isn't as essential as getting them
    > lined up properly.
    >
    > The two javascript files are here:
    >
    > http://www.timkeay.co.uk/mpc2/js/menu_var.js
    > http://www.timkeay.co.uk/mpc2/js/menu_com.js
    >
    > Have posted this problem previously and had a kind reply from someone
    > suggesting to start from scratch with a CSS-based menu. However, I'd be
    > very grateful if someone could take a look at the actual javascript
    > code and let me know how to fix it.
    >
    > Thanks a lot,
    >
    > Tim
    Tom Cole, Sep 6, 2006
    #2
    1. Advertising

  3. Timmah1980

    ASM Guest

    Timmah1980 a écrit :
    > I'm sure this is a simple enough fix for someone out there, but I'm
    > afraid it's beyond me!
    >
    > I'm putting together this simple menu for a client:
    >
    > http://www.timkeay.co.uk/mpc2/index.htm
    >
    > It works fine, but I'd like to make a couple of tweeks. As you can see,
    > the sub-menus don't sit exactly in line with the header, so I'd like to
    > shift them right by one pixel to correct this. I'd also like to shift
    > them up one pixel, to remove the apparent double line between the
    > header and the sub-menu, but this isn't as essential as getting them
    > lined up properly.
    >
    > The two javascript files are here:


    but without a real stylesheet ... how to find what do what ?
    Wich human can turn this soup?

    LisTamatic examples :
    http://css.maxdesign.com.au/listamatic/horizontal02.htm
    and follow all next examples

    hrizontal expandable menu with little delay :
    http://dosimple.ch/articles/Menus-dynamiques/menuHorizontal.html

    > Have posted this problem previously and had a kind reply from someone
    > suggesting to start from scratch with a CSS-based menu.


    Ha ! So I'm not alone.

    > However, I'd be
    > very grateful if someone could take a look at the actual javascript
    > code and let me know how to fix it.


    Seriously
    - your code is very much too complex I could find something.
    - learn CSS ad use them.


    --
    Stephane Moriaux et son [moins] vieux Mac
    ASM, Sep 6, 2006
    #3
  4. Timmah1980

    Timmah1980 Guest

    Thanks Tom.

    > In I.E. they do line up, exactly. In Firefox they're off 1 pixel.


    Yeah, I noticed this shortly after posting. I use FF myself, but am
    aware the best option is to make it look right in IE. It's for a local
    church website, so most users will be Microsoft standard-install
    people, rather than installing their own (better) browser.

    > I.E. still constitutes over 60% of browsers (by most references, with
    > some variation). Firefox makes up roughly 30%, the rest can fight over
    > the 10 that's left...
    > When you change your menu to shift one space to the right, it will now
    > be offset in 60% of the viewers' eyes, not 30%. Shifting will not help
    > the other 10% that are missing borders anyway. Your problem will be
    > worse (as far as percentages are concerned), unless you mandate that
    > your viewers use Firefox.


    I've had a friend look at it, who managed to shift them up one pixel,
    but he basically said the same thing about shifting it right one pixel.
    So, thanks...very good advice! ;o)

    Also, thanks to "ASM" for the link - will look into it.
    And when I find someone to turn your soup, I'll let you know! ;o)
    Timmah1980, Sep 7, 2006
    #4
    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. SirPoonga
    Replies:
    2
    Views:
    752
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,009
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    470
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    266
  5. Ivann
    Replies:
    1
    Views:
    193
    Ivann
    Jul 22, 2008
Loading...

Share This Page