How to keep Firefox 3.5 running after closing last tab and add a close tab button on the last tab
Firefox 3.5 came with one one more annoying UI change that is once you have closed all the other tabs and only one tab is open the close tab button disappears from the tab and you can now just close the Firefox window by pressing the close button on top right or just hit ctrl+w but the problem is that this behaviour is not really suitable for a browser like Firefox which takes ages to start once you close it unlike Google chrome, and personally i am used to closing all the stuff in the tabs and let Firefox keep running and then open any website i have to in the empty tab. so now i am going to show you guys how to disable Firefox from closing the window when you close the last tab.
Type about:config in your Firefox address bar and press enter press the “I’ll be careful, I promise!” button and now search for “browser.tabs.closeWindowWithLastTab” and double click it to change its value to false, now whenever you close the last tab using ctrl+w or the close tab button we are just going to add the Firefox window wont close.
I personally like to have a close tab button on all the tabs in Firefox even if there is one tab open which was the default behaviour of Firefox 3.0 so that i can close the site opened in a tab and have an empty tab, so now to get that close tab button back you will have to modify the userChrome.css file for that we need to open the chrome folder where the userChrome.css file resides for that you need to browse to “x:\\Document and Setting\%your username%\application data\Mozilla\Firefox\profiles\%your active profile folder%\chrome\” (where x is your windows installation directory), once you are there, you have to find the userChrome.css file if its not there, don’t worry, its not there for most people just open userChrome-example.css file and save it as userChrome.css and now add these lines to it under the @namespace line:
/* Add tab-close-button to last tab*/
.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;
}
now just save the file and close it, restart Firefox and you will now see the close tab button appears even if you have one tab open, this along with the above tip can make using Firefox a bit more convenient.
if you encountered any problem just leave a comment and i will be glad to help you out.
- Related Posts:
- How to remove the new tab button in Firefox 3.5
- How to Make Firefox Use Windows Vista theme in Windows XP
- Modify Incompatible Firefox Extensions to make them work with Firefox 3
- Add a “Clear list and close Window” button to Firefox download manager
- Make Firefox open new tabs next to current tab instead of last tab
- Latest Posts:
- How to keep Firefox 3.5 running after closing last tab and add a close tab button on the last tab
- How to remove the new tab button in Firefox 3.5
- Remotely Control your Torrents on Linux
- Make Firefox open new tabs next to current tab instead of last tab
- Easily Download Youtube Videos Using Flashgot











ooohhhh!!! achaa!!!
Heh
sup?
whoa saad that is awesome. I also like close button on all tabs
nice tut
Thanks a lot
I think that’s impossible =)
thanks from Turkey !
Thank you very much for this awesome hack (in the best sense of the word). I have been poking around in the code, trying to solve a small issue, but I have been unsuccessful – I just haven’t had the time to really learn how to hack Firefox. I made one boring extension long ago, and never had the time to get back into it.
Anyway, when I right click on the last tab in a window, the ‘Close Tab’ context menu choice is greyed/ghosted out. I usually use the context menu and not the (x) button because my mousing skills have gone down hill due to carpal tunnel nerve damage. Even after getting the relevant surgery, my mouse aim is a bit too jittery for small buttons.
I wish I knew enough to solve this problem myself, but I don’t. Any help would be greatly appreciated.
Much obliged,
-Bif