Hide the vertical scrollbar in Firefox

haxThere’s never enough screen real estate no matter how big your resolution or how many displays you’ve got.  However most of the time it’s possible to optimize your UI to be as small as possible so that the actual content gets the maximum amount of SRE.

Classic Compact is a theme for firefox designed to minimize the size of the UI while still keeping it’s functionality intact. It can be tweaked even smaller with the Classic Compact Options addon. Classic Compact, however gets ~6000 weekly downloads so quite a few people obviously know about it by now.

However, there’s one thing even the aforementioned theme doesn’t fix: the vertical scrollbar. Go ahead and ask yourself how often do you favor flicking the mouse wheel instead of using the scrollbar? After all, that’s 14-20 pixels of horizontal space it’s wasting ;)

I did some research and most of the solutions regarding the removal of Firefox 3’s scrollbar involved modifying stylesheets inside .jar-files with a different file to find and edit for Firefox2, Firefox3 and Firefox3 on Vista. Some of these also disabled the ability to scroll with the mouse wheel. Luckily I found Stylish, an add-on which lets you use different style sheets for different websites. It also has the possibility to set global styles and this is where it comes in handy.

After installing Stylish and restarting Firefox, just create a new style with the following content:

/* hide scrollbars */
notificationbox {
overflow-x: hidden;
overflow-y: hidden;
}
browser[type="content-primary"], browser[type="content-targetable"] {
overflow-y: scroll;
overflow-x: scroll;
margin-right: -17px;
margin-bottom: -17px;
}

Now click on Preview, adjust the -17px to suit your system’s settings and you’re done.

Oh, and if you ever happen to need the scrollbar for some reason, you can disable the style with 2 clicks of the mouse!

Tags:

13 Responses to “Hide the vertical scrollbar in Firefox”

  1. David Says:

    Worked like a charm (on top of Autohide)! Gracias

  2. Ilian Andreev Says:

    great great !!!

  3. Eden Vladia Says:

    Thanks a bunch! This works flawlessly.

  4. Pipps Says:

    Your guide is a brilliant solution for removing the vertical scrollbar!

    Is it possible to remove the horizontal scrollbar too?

    I would really like to be able to dispose of both!

    Thank you

  5. Mosse Says:

    Code now updated to remove both scrollbars.

  6. Nomin Says:

    Preaching minimalism while leaving the ridiculous amount of default border padding on windows doesn’t make sense.

  7. 114 Says:

    Thanks, works brilliant. It moved the scroll bar more to the right site, it doesn’t disappear the whole scroll bar

  8. god Says:

    good

  9. 114 Says:

    This is a still better code.

    http://userstyles.org/styles/13594

  10. kissi Says:

    Is there away that you can edit this code so that it will still show the status bar at the bottom? That would be great. This code is better than the last one pasted cause this doesnt disable the scroll function with two fingers :-)

  11. Vijay Says:

    Wow Dude its Rocks. I was madly luking for this. thanks for your help
    You aree Superb

  12. emailtoid.net/i/400aa0e2/… Says:

    So useful! Like you said, “that’s 14-20 pixels of horizontal space it’s wasting”
    Thanks!

  13. Simon Says:

    This is great and really easy. thanks!

Leave a Reply

* Name & mail required if not using OpenID