Saturday, July 11, 2009

Close button missing from first tab in Firefox 3.5

I just upgraded to Firefox 3.5 and while it's still fairly familiar, there are a couple of things that have changed that aren't to my taste. The main one that bugs me is with the tab close button.

In Firefox 3.5, when you only have one tab open it doesn't have a close button. You can get this back by editing your userChrome.css file. For Windows users:
  1. Open Windows Explorer and navigate to:

    %AppData%\Mozilla\Firefox\Profiles\<your profile>\chrome
  2. Look for a file called userChrome.css. If it doesn't exist, create a copy of userChrome-example.css called userChrome.css.
  3. Edit userChrome.css using Wordpad (Start > Run... > write)
  4. Add the following code to the bottom:
    /*
     * Firefox 3.5 doesn't show the close button on the last tab
     * http://mozillalinks.org/wp/2009/07/disable-tab-tearing-and-six-other-firefox-3-5-tab-tweaks/
     */
    .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; }
  5. Save your changes and restart Firefox.


The other thing that bugged me was that when I close the last tab, Firefox would exit. This is easily fixed by tweaking an about:config setting:

  1. Open Firefox and type about:config in the address bar (and hit Enter).
  2. If prompted with a warning, read and accept it.
  3. In the Filter box at the top, type in closewindow
  4. Double click the entry named browser.tabs.closeWindowWithLastTab so that the value is set to false.


[ Found on Mozilla Links ]

Labels: ,

3 Comments:

At 23 July, 2009 07:27, Blogger Gautam Jain said...

good one thanks!

 
At 23 July, 2009 07:32, Blogger Gautam Jain said...

But the CSS tip is not working for me. The close button appears for a moment and then it disappears.

I restarted Firefox.

 
At 23 July, 2009 11:37, Blogger Surferbill said...

Hi Gautam,

Not sure why it wouldn't work for you. Make sure you're updating the correct userChrome.css file and not the -example file. Also, maybe check it you've got more than one profile, and that you've copy/pasted everything correctly. I don't think line-wrapping is important but if you copy from the original site that might also help.

Good luck!

 

Post a Comment

<< Home