Is it possible to prevent a web page from shifting to the left when the page scroll bar appears? I'm guessing it is but have no idea how to prevent it.
thanks,
Is it possible to prevent a web page from shifting to the left when the page scroll bar appears? I'm guessing it is but have no idea how to prevent it.
thanks,
Blake
Please show us an example. It might change if you have changed the width of the div so that it excludes the scrollbar's width also. This is my guess, without seeing the code.
![]()
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...
Hi there blakemckenna,
The vertical scrollbar will always move the page content to the left if it has fixed width
and margin:auto or a percentage margin-left value.
Using this CSS...
...will put a scroll bar on the pages that don't require them and keep all pages uniform.Code:body { overflow-y:scroll; }![]()
Thanks Coot...I'll give it a shot!
Blake
No problem, you're very welcome .