Tuesday, March 29, 2011

Firefox-4: Prevent Tab scrolling / tabMinWidth not working / Tab width setting

Firefox-4 does not support the configuration option >> browser.tabs.tabMinWidth [1]

In Firefox 3.6 and older, you could set this value to 0 in about:config to prevent the scrolling of tabs if you opened up a large number of tabs.

To get this to work in Firefox-4, you need to make some changes to your userChrome.css file [2]. Or you can install the Custom Tab Width Extension [3]

In my XP installation the userChrome.css file was in
C:\Documents and Settings\<userName>\Application Data\Mozilla\Firefox\Profiles\<randomString>.default\chrome\userChrome.css

Open this file, add the below lines

/*--start below this line--*/
/*Added to re-enable min tab width=0 in Firefox-4 */
.tabbrowser-tab:not([pinned]) {
    min-width: 1px !important;
}
/*--stop above this line--*/

Restart Firefox and your tab behaviour should be back to the way it was.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=574654
[2] http://blog.miranda.or.at/mozilla/firefox-4-and-minimum-maximum-tab-width
[3] https://addons.mozilla.org/en-us/firefox/addon/custom-tab-width/