Vertical scroll bars in Firefox

If you use Firefox, a difference that you might run across is that when
IE displays a page that does not need a vertical scroll bar, the bar
still appears, its simply disabled, whereas in Firefox the bar is just
gone.  This can mess up your site design if you have a fixed width
site because the pages without the scroll bar will shift to the right
slightly, which can be really annoying.  You can use the following
css style to force Firefox to show the scroll bar, however it won’t be
disabled like in IE, it just doesn’t scroll.

HTML {   overflow: -moz-scrollbars-vertical;}

11 Comments

  1. Anonymous said,

    Wrote on June 9, 2005 @ 2:42 pm

    Many thanks for this tip – I have been battling with making pages display properly in IE and Firefox, trying different ways to sort it out in the style sheet. This one works at last!

    You’re a star – thanks again :)

    Jill

  2. Anonymous said,

    Wrote on July 12, 2005 @ 1:18 pm

    Is there a way to force IE to NOT show a disabled vertical scrollbar when a vertical scrollbar is not needed?

  3. Anonymous said,

    Wrote on July 12, 2005 @ 2:11 pm

    Add this tag to your CSS file.

    html{
    overflow: auto;
    }

  4. Anonymous said,

    Wrote on August 14, 2005 @ 5:09 pm

    Thanks a lot!

  5. Anonymous said,

    Wrote on January 3, 2006 @ 8:18 am

    THANKS!!!!!!!!!!!!!!!!!!

  6. Anonymous said,

    Wrote on February 14, 2006 @ 5:53 pm

    This works a treat, extremely helpful and a real timesaver – thanks very much!

    Hey BTW here’s a useful link to an online table of all the CSS filters/hacks, with OS/Browser combinations:
    http://centricle.com/ref/css/filters/

    Thanks again!

  7. Anonymous said,

    Wrote on March 6, 2006 @ 8:13 am

    Problem is… it wont validate as valid css!!

  8. Jon Sherrill said,

    Wrote on January 3, 2007 @ 4:07 pm

    Just what I was looking for! Thanks!

  9. vega said,

    Wrote on January 14, 2007 @ 9:20 am

    THANKS for the tip ! its the right one !!!

  10. ) design collected ( :: links for 2007-12-31 said,

    Wrote on December 31, 2007 @ 4:12 am

    [...] Vertical scroll bars in Firefox « Ben Reichelt’s Weblog Is your site design centered on the page? Use this to always display the vertical scrollbar in Firefox and avoid the horizontal shift of your page when it jumps to a scrollable length. (tags: webdesign, webdevelopment, firefox, hacks) [...]

  11. Maggie Naylor said,

    Wrote on February 2, 2008 @ 10:31 am

    I am not an IT person and I am having trouble with using firefox’ scrollbar. The down arrow is covered by the little box that you use to enlarge windows (I don’t know what it is called) and I can’t access it with the cursor (which is really annoying). Any simple solutions? I notice that Safari has a bar that goes right across the bottom and prevents the overlap.

    Maggie

Comment RSS