Show Close Button In Last Tab with Firefox 3.5
Posted: July 6th, 2009 | Author: jriggs | Filed under: firefox | Tags: button, close, firefox, restore, show | 11 Comments »In the latest version of Firefox if you only have 1 tab open, that tab will not have the close button on it. You can still close this tab using the menu, or the ‘ctrl+w’ shortcut.
If you would like to add the button back, you’ll need to edit the userChrome.css file the Firefox uses. On my XP computer it is located here:
C:\Documents and Settings\<your_account>\Application Data\Mozilla\Firefox\Profiles\ftz0ce5v.default\chrome
On OS X you will find this file here:
~/Library/Application Support/Firefox/Profiles/ftz0ce5v.default/chrome/
Note that ‘ftz0ce5v’ is randomly generated by Firefox so you will see something slightly different. Once in this directory you should see a file named ‘userChrome-example.css’. Make a copy of this file in the same directory and rename it to ‘userChrome.css’ (if it doesn’t already exist).
Open the file you have just created an add the following lines:
.tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab > .tab-close-button {
display: -moz-box !important;
}
.tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) >
.tabbrowser-tab[selected="true"] > .tab-close-button {
display: -moz-box !important;
}
Restart Firefox and you will see the last open tab now has a close button. Original code and other nifty customizations found here.