Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Remove Page-Shift in FF due to Scrollbar

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #24236
    TheDoc
    Member

    Just add this little nugget to your HTML element in your CSS file:

    Code:
    html { overflow: -moz-scrollbars-vertical; }

    Done! This can be a very frustrating problem for people that don’t quite see exactly what is causing the page shift.

    #54359
    Chris Coyier
    Keymaster

    That’s a good one, I haven’t used that before I don’t think. It’s a tricky subject actually. Since some browsers experience the "jump" between not having a scroll bar and having a scrollbar (on centered sites) and some do not.

    The technique I typically use is:

    Code:
    overflow-y: scroll;

    …which actually doesn’t validate (who cares).

    A while back I tried a bunch of different ways:
    https://css-tricks.com/eliminate-jumps-i … croll-bar/

    #54362
    Rob MacKay
    Participant
    "chriscoyier" wrote:
    The technique I typically use is:

    Code:
    overflow-y: scroll;

    …which actually doesn’t validate (who cares).

    hehe me too :) and no it dosnt validate lol

    #67320
    cybershot
    Participant

    nope, got it working. all is good. thanks for the sollution

    #67324
    AshtonSanders
    Participant

    Sweet guys. This is brilliant. I had no idea.

    "chriscoyier" wrote:
    Code:
    overflow-y: scroll;

    …which actually doesn’t validate (who cares).

    Both options listed in this thread don’t validate:

    Quote:
    html Value Error : overflow -moz-scrollbars-vertical is not a overflow value : -moz-scrollbars-vertical
    html Property overflow-y doesn’t exist in CSS level 2.1 but exists in [css3] : scroll

    btw, is there a way to say that your CSS file is css3?

    #68028
    lookslikepat
    Member
    "AshtonSanders" wrote:
    btw, is there a way to say that your CSS file is css3?

    Nope, but I wouldn’t be surprised if it popped up in the future.
    In the meantime we’ll just have to do
    http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fcss-tricks.com%2F&profile=css3

    #81453

    I’m sure everyone knows this by now, but…

    <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3">Valid CSS 3</a>

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Other’ is closed to new topics and replies.