Forcing a Vertical Scrollbar in Firefox
Wednesday, June 22nd, 2005A while back I did a personal site, and kept running into a small problem. On some pages, there was enough content to force the page to scroll. On pages that did not have enough content, the vertical scrollbar in Firefox would not display. This caused the page to shift about 15 pixels to compensate for the missing scrollbar. Internet Explorer always displays a scrollbar; If there is not enough content for the page to actually scroll, it disables it. It really might not be a huge deal, but if you are a nit-picker like me, you like having the consistent page real estate. After some research and trial-and-error tweaking, I settled upon a solution. The addition of this bit of CSS did the trick:
html {
min-height: 100%;
margin-bottom: 0.01em;
}
Is this helpful to you? Leave a comment!
