SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    731
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Strange Screen Height Issue

    Hi,

    I have designed a page which is taller than a single screen and it works fine. However, when the same design is shorter than the screenheight the page sits the left by just a few pixels.

    It means that if if a click through my site the page is not always strange,

    Is their a method of ensuring a page is at least the height of the screen?

    Some pages will be different heights as the content is echoes from a database. One page could 20 screens tall whilst another is currently half a screen height tall.

    Any suggestions on how to fix this please?

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,549
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I guess you are talking about the fact that on some browsers the vertical scrollbar isn't present unless its needed which is why the screen shifts on longer pages because the vertical scrollbar has popped into place.

    You can force the issue with this CSS:

    Code:
    html{overflow-y:scroll}
    That will ensure the scrollbar is always present.

  3. #3
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    731
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks mate, that sorted it.


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
  •