Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Always Show Vertical Scrollbar in Firefox (See related posts)

To always show the vertical scrollbar, regardless of whether there is content to scroll (à la Internet Explorer), add this to userContent.css

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


Tested in Firefox 1.0 and above.

Comments on this post

anionic posts on Feb 09, 2006 at 13:38
Unfortunately this prevents the horizontal scrollbar from appearing when the displayed page is too wide, so that the only way to see the right edge of a wide page is to stretch the browser itself.

It seems to be impossible to configure Firefox with IE's default behaviour (vertical scrollbar always present, horizontal scrollbar shown only when required).
phil posts on Dec 06, 2006 at 16:21
html { height: 101%; }

this will trick firefox into thinking there is more vertical space at the bottom of the page. It's a tiny amount, so it's not that noticible, but it helps keep pages from shifting horzontally. Hope this helps.

Phil
mbeijen posts on Jan 12, 2007 at 19:41
html {overflow: scroll;} will take care of this correctly
emdeekay posts on Jul 27, 2007 at 14:52
html {overflow: scroll;} works but it also gives you a horizontal scroll bar.

html {overflow-y: scroll;} will give you just a vertical scroll bar, if that's what you are going for.
dbausd posts on Apr 08, 2008 at 10:52
In a frameset environment add the attribures
scrolling="yes" style="overflow-x:auto"
to your <frame> Tag, and scrollbars in Firefox work like scrollbars in Internet Explorer.

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts