Forcing a Vertical Scrollbar in Firefox
A 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!
July 10th, 2005 at 8:18 pm
Haha, oh my god. This has been annoying me for ages. Never bothered to figure out a fix for it though.
Long live the nit-pickers!
Meh. I feel so guilty everytime I come to your site because my blog is still in the default theme. I may be a narky nit-picker at work, but I’m so very lazy when it comes to my own blog. I’ll hopefully get around to spiffing it up soon.
July 13th, 2005 at 8:57 am
aww, it’s okay.. i’m sure you’ll get around to modifying the theme sometime. i know you stay busy over there!
thanks for commenting, Emma!
August 24th, 2005 at 1:59 pm
That’s a fantastic trick. It seems simple now that I think about it but I struggled with this for awhile. Thanks a bunch.
August 24th, 2005 at 2:27 pm
I’m glad it was useful! Thanks for commenting