Scrollbar moves site 10px

Discussion in 'HTML & Website Design' started by Masteroa, May 16, 2010.

  1. #1
    When I have long page, which needs scrolling, I have a scrollbar. Of course, this scrollbar moves my site 10px to the left. But I also have short pages which don't need scrolling. These pages don't move 10 px because there isn't a scrollbar. The problem is, when people are moving from page to page, the site moves to the left and to the right, which is quite annoying and doesn't look good.

    Now, it there a way to stop the website from moving when a scrollbar appears, or is there a way to keep the scrollbar forever, even if there isn't need for scrolling?
     
    Masteroa, May 16, 2010 IP
  2. designmonkey

    designmonkey Peon

    Messages:
    70
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you could always show the scrollbar using javascript, which is not wise move imo.

    or, you could set your page width into some safe-width. Since 1024px width is considered as standard-minimum size, i'd say 960px-970px width is safe. so scrollbar didn't meddle in your design.
     
    designmonkey, May 17, 2010 IP
  3. Masteroa

    Masteroa Peon

    Messages:
    54
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I was referring to the vertical (height) scrollbar :'P
     
    Masteroa, May 18, 2010 IP
  4. designmonkey

    designmonkey Peon

    Messages:
    70
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yes, i was talking about the vertical scrollbar too. Your case happens most of the time because of the content wrapper is set to full the whole screen ( width : 100% ), so when the scrollbar appear it pushes the content to left.

    btw, it'll be better if you could provide the live url of your site, so we could discuss in specific. otherwise set the width of your wrapper to the fixed size i mentioned above or set it to around 97%-98% if you want to have fluid layout width.
     
    designmonkey, May 18, 2010 IP
  5. NiQuil

    NiQuil Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hey there Designmonkey,
    I hope it's not to late to pop this post?

    I seem to be having the exact same problem with ie8. If you see www.futuretakamba.net there the scrollbar wil move the site from left to right when changing between 'The project' and 'Video'. (also there is a difference between present and the rest, but I haven't come around tot that yet)

    Though my wrapper is set to 940px.

    I'm currently checking ie6 aswell, but That'll prolly be the same.

    I'd really appreciate if you'd look into it.

    Kind regards
     
    NiQuil, Aug 15, 2010 IP
  6. NiQuil

    NiQuil Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hey there again.

    I saw another container in the markup, one that I had missed. I think i'll be able to fix it so don't 'waste' your time on my problem just yet. :)

    Kind regards
     
    NiQuil, Aug 15, 2010 IP
  7. davecuttriss

    davecuttriss Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Add this to your CSS:

    html {height: 100%; margin-bottom: 1px; overflow-y: scroll;
    } /* This forces a scrollbar on short pages in Firefox, */


    Dave
     
    davecuttriss, Sep 27, 2010 IP