Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
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.