gregdoolittle.com

forced scrollbars

June 9th, 2007

i realized that some of the sites i designed when i was first putting sites together all shared a common glitch. the problem was that pages with only a little amount of content didn’t get scrollbars, whereas pages with more than a screen’s capacity of content required scrollbars. the reason this is a problem is that when you navigate from one page to the next, the page layout jumps left and right by about 10px from pages with scrollbars to pages without them. minor problem, but some might say the devil’s in the details. it’s just one more way to make a site pixel perfect. i recently googled the words “forced scrollbars”, and found this article which shows how to solve this problem:

http://www.splintered.co.uk/experiments/49/

basically all you need to do is add this to your css, and you’ll get scrollbars on every page:

html { min-height: 100%; margin-bottom: 1px; }

Powered by WordPress