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.
Related posts:
- Remove New Tab Button From Firefox 3.5
- Useful Shortcuts For Firefox
- Use FireGestures to Open Your Favorite URL
- Firefox Clear History Not Working – version 3.5.7
- Disable javascript in Firefox
This does not work on my mac.
I am using the Grapple Delicious theme. That may be an issue. If I use Command W to close the last tab I see the close button for a second then it disappears. Any thoughts? Steve.
Hi SJ
Unfortunately I don’t have a Mac to test on right now, but I’m pretty sure that your theme is what’s causing the problem. To double-check, disable the theme and see what happens.
Joe, you were 100% right. Thank you. Sorry I didn’t think to check that. Your help with these “minor” issues are massively appreciated by me and others.
or:
about:config -> browser.tabs.closeWindowWithLastTab = false
Ahhhhh thanks brother, it is so friggen good to get that back!!
And by the way Yoblin, your fix didn’t work!
Got Windows Vista? It’s easy with this plugin: https://addons.mozilla.org/en-US/firefox/addon/12991
THANK YOU SO MUCH! especially for that tab plus sign article!
Great! Thanks very much!
Great tip, much appreciated, thanks.