SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict webmistress's Avatar
    Join Date
    Aug 2002
    Location
    Derbyshire, UK
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Centered css layout- page is out of line between pages with scroll & those without

    I am using the same layout from: http://www.pmob.co.uk/temp/1colcentred.htm

    (Thanks so much Paul O'B!!)




    And I am wondering if there is any work around for the way the whole page jumps if you go from one page with no scroll to one that does scroll… See what I mean?



    I cannot think of one because how can you account for the scroll bar when it is not there without it not being centered!? Seems mad!


    Laura
    ****************
    The Webmistress

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Impossible Unless there is a trick with javascript.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,484
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    You can set the page to be 100.1% high and the scroll bar will be there all the time and then you will get no jump. Thats the only way really (or js as mstwntd said which would be complicated)

    Code:
    html,body{height:100.1%}

  4. #4
    SitePoint Addict webmistress's Avatar
    Join Date
    Aug 2002
    Location
    Derbyshire, UK
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Paul you are a god!
    Thanks. Whohooooooooooo. Why didn't I think of that!?
    ****************
    The Webmistress

  5. #5
    Object Not Found junjun's Avatar
    Join Date
    Mar 2002
    Location
    northern MI
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Man I wish I knew about this a week ago
    Time to hang out at Sitepoint more often again..!


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
  •