Results 1 to 5 of 5

Thread: Right side of page shifts to the left when the scroll bar appears?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Right side of page shifts to the left when the scroll bar appears?

    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

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Right side of page shifts to the left when the scroll bar appears?

    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 FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3
    Hyperactive Member coothead's Avatar
    Join Date
    Oct 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    285

    Re: Right side of page shifts to the left when the scroll bar appears?

    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...
    Code:
    body {
        overflow-y:scroll;
     }
    
    ...will put a scroll bar on the pages that don't require them and keep all pages uniform.


    ~ the original bald headed old fart ~

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: Right side of page shifts to the left when the scroll bar appears?

    Thanks Coot...I'll give it a shot!
    Blake

  5. #5
    Hyperactive Member coothead's Avatar
    Join Date
    Oct 2007
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    285

    Re: Right side of page shifts to the left when the scroll bar appears?

    No problem, you're very welcome .


    ~ the original bald headed old fart ~

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width