Scrollbars on Short Pages

Posted Dec 11, 2006 @ 2:03 am, Viewed by 637 Visitors, Read 639 Times.
On a page that doesn't have enough content to fill the height of the viewing area, browsers don't add a scrollbar. This can be annoying because on a centered page the location of your page will move if there is a scrollbar on the page or not. The solution I have found is to use this CSS:
html {height: 100.1%; }
This will add a scrollbar to your page no matter how little content you have in the page. The browser will think there is more than 100% of the page view being used.
  • Rate this Post!
  • Print

1 Responses to “Scrollbars on Short Pages”

photo Kolo

html {height: 100.01%; } is little better, so page won't scroll at *all*, if there is no enough content. Exept if the desktop is 10000px height

Posted 1 year ago
REW Blogs User Stats
Currently Online Users: 1
Total Users: 1,893
Entries: 5,754
Unique Views: 3,306,740
Total Views: 3,450,094
Total Comments: 6,302
Related Posts
This User's Stats
Blog Entries: 3
Average Blog Rating: 0
Unique Views: 1,925
Total Views: 1,929
Comments Posted: 1
Comments Received: 2
Listed In