Welcome to WebmasterWorld Guest from 54.146.30.44

Forum Moderators: open

Message Too Old, No Replies

hiding scrollbars shifts page to right by 20px

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

New User

10+ Year Member

joined:Apr 21, 2005
posts:24
votes: 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

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

New User

10+ Year Member

joined:Apr 21, 2005
posts:24
votes: 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?
2:46 pm on Feb 15, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Mar 29, 2007
posts:1147
votes: 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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members