Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: HV Menu positioning and Mozilla scrollbars

  1. #1
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HV Menu positioning and Mozilla scrollbars

    1) Script Title: HV Menu v5.5

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

    3) Describe problem:

    Regarding the HV Menu script.
    I have a positioning problem with Mozilla 1.6:

    I use a centered layout and menu
    var MenuCentered='center';
    var StartTop=80;
    var StartLeft=-87;

    Mozilla browser windows doesn't display a scrollbar when it isn't needed.

    On shorter pages that doesn't have a scrollbar the menu is displayed ok.
    When a longer page loads and the vertical scrollbar is displayed all the layout recenters in the window but the menu remains offset by the width of the scrollbar.

    In IE this isn't a problem because the scrollbar is displayed as disabled even on pages that doesn't scroll.

    I also tried with a relative positioned menu using TargetLoc='MenuPos' and the div tag as described in the docs, but the problem was the same.


    How can I work around this ?

    Thank you very much
    Eddie

  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

    Code:
    <style type="text/css">
    html {
    overflow-y:scroll;
    }
    </style>
    That will make FF like IE.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    I put the code above into the head of the page but it did not make any difference. Any suggestions.

    Thanks Eddie

  4. #4
    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

    Try:

    Code:
    <style type="text/css">
    body {
    overflow-y:scroll;
    }
    </style>
    But, here it did force FF to display an empty vertical scrollbar on short pages. Did you put it on the short pages?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John

    Yes the code is forcing FF to display an empty vertical scrollbar, even on short pages. However, the layout still recenters in the window but the menu remains offset by the width of the scrollbar. Thanks for all your help. What can I do?

    Eddie

  6. #6
    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

    Might be something with the script or how you've configured it. How about a link to the pages? Preferably with the style change as noted.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John

    The link to the main page is http://www.syoa.co.uk/action4housing/index.htm

    However, it does not have the <style type="text/css">body {overflow-y:scroll;}</style> tag becuase I'm at work and I don't have access to the page. I have been woking locally. However, the page above is forced by FF to display a scrollbar.

    The javasctipt file which the menu uses is -
    http://www.syoa.co.uk/action4housing...mplmenu_var.js

    if you can offer any help that would be great. The page looks how it should in IE.

    Thanks

    Nick

  8. #8
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    the Js file should be - http://www.syoa.co.uk/action4housing...mplmenu_var.js

    thanks Nick (Eddie is my nickname by the way)

  9. #9
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have now put that code into the page on http://www.syoa.co.uk/action4housing/index.htm

  10. #10
    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

    Try changing (in exmplmenu_var.js):

    Code:
    var StartLeft=0;
    to:

    Code:
    var StartLeft=document.body.filters? 0 : -10;
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •