I would keep right or left -9000px instead of display:none for many reasons. I think you could solve your problem of scrollbar simply by setting the top to -9000px