SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hiding scrollbars shifts page to right

    Guys
    This is lil urgent..
    I am hiding the scrollbars using document.documentElement.style.overflow = "auto";
    But No. 1. the page shifts to right by 20px with the jerk once the scrollbars are disabled. 2. after enabling again it shifts to left again by 20px with the jerk also gives the horizontal scrollbar in IE.
    ::How to get rid of this 20px shift to right and horizontal scrollbar in IE…


    Thanks in advance - Vicky

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or is there a way i can gray out the scroll bar. The scroll bar should not hide it should just stop working but visually be there.. can we do it???

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,807
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    To start with the movement isn't 20px it is whatever width the scrollbars are set to.

    The way to fix that is to get rid of the auto and use "scroll" instead so that the scrollbars will always appear.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •