homepage Welcome to WebmasterWorld Guest from 54.166.105.24
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
hiding scrollbars shifts page to right by 20px
designer123




msg:3573594
 6:43 am on Feb 13, 2008 (gmt 0)

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

 

designer123




msg:3573700
 11:04 am on Feb 13, 2008 (gmt 0)

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?

Dabrowski




msg:3575787
 2:46 pm on Feb 15, 2008 (gmt 0)

Vicky - the scrollbar becoming grey and non-functional is the default behaviour.

Also, setting the overflow property in the CSS will stop the page jumping after the JS kicks in.

If you must do it by JS then add a body margin at the same time to balance the page and stop it jumping, I believe in IE it's actually 14px.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved