Show Close Button In Last Tab with Firefox 3.5

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.

close button on last tab

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.

11 thoughts on “Show Close Button In Last Tab with Firefox 3.5”

  1. 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.

    1. 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.

  2. 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.

Comments are closed.