Results 1 to 4 of 4

Thread: jumping div if taller than browser

  1. #1
    Join Date
    Sep 2006
    Location
    uk
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default jumping div if taller than browser

    Hi, I'm new here but not a stranger to CSS anyway, I've been having an annoying problem with centered designs that have some pages taller than the browser and some that fit the height of the browser.

    When I navigate from a "short" page without a vertical scrollbar to a "long" page with a vertical scrollbar the centered content jumps to the left a few pixels.

    I am centering my pages with

    margin:auto;

    and it only happens on bigger resolutions....

    Any ideas how to fix this??

  2. #2
    Join Date
    Sep 2006
    Location
    uk
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    !!FIXED!!

    just to let you know in case anyone else suffers the same:


    1. add "overflow-y:scroll;" to the body tag.

    2. BUT this causes double scrollbars in IE - uuuurrrrrg.

    3. SO conditional stylesheet for FF where you add the overflow property and one for IE where you dont.

    job solved, feet up, cuppa tea

  3. #3
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    how about making the center div the height of the body and it's contents scrolled?

  4. #4
    Join Date
    Sep 2006
    Location
    uk
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks ItsMeOnly,

    no good for this design, but a good idea all the same

Bookmarks

Posting Permissions

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