How To Remove The Close Button In The Firefox 4 Add-On Bar

Martin Brinkmann
Dec 26, 2010
Updated • Mar 30, 2014
Firefox, Firefox add-ons, userscripts
|
23

Update: Please note that Mozilla has removed the add-on bar in Firefox 29 and newer versions of the browser. You can only get it back by installing add-ons such as Classic Theme Restorer. There is no close icon on the bar though so that the instructions are no longer required.

A recent change in the latest Firefox 4 development releases has been driving me nuts lately. The developers thought it would be a good idea to add a close button to the add-on bar.

The add-on bar, being the successor of the status bar is currently handled different in the browser than other toolbars like the bookmarks toolbar.

Why? Because of the close button which does not really make sense at all since it is perfectly possible to close the add-on bar by right-clicking it and removing its selection from the enabled toolbars, or by going to View > Toolbars to do the same.

Even worse, if you happen to close the add-on bar accidentally you can only reopen it in the View > Toolbars menu.

Lastly, the position of the close button on the far left of the toolbar is irritating to say the least and inconsistent with the position of other close buttons in the browser.

It took me a while to find a way to remove the close button from the Firefox 4 add-on bar. You need to add three lines of code to the userChrome.css file in the Firefox profile folder.

Here is how it is done. Open your Firefox profile folder. The easiest way to locate it is to click on Help > Troubleshooting Information to reveal it. A click on Open Containing folder in the new tab opens the folder in the default file browser of the operating system.

Locate or create the folder chrome in there, and in that folder the file userchrome.css. If the file does not exist create a new plain text file and rename it accordingly. Then edit it with a standard text editor and add the following lines to the file while Firefox is closed.

#addonbar-closebutton {
visibility: collapse !important;
}

Start Firefox afterwards and you should see that the close button has been removed from the toolbar.

Firefox 4 add-on bar close button

Firefox 4 add-on bar

That's how you remove the close button from Firefox 4's add-on bar. A discussion is currently undergoing about the close button. It appears it is there to stay, even though some users have voiced concerns.

Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. McKenna said on August 18, 2015 at 1:29 am
    Reply

    Instructions _are_ required for post v29.0 as those of us who want status bar back get it via extension. But that extension shows the stupid “X” close button to the left, just where it is in the FIND bar, too!! Annoying! But this userChrome syntax doesn’t work now at v39.0. Anyone know of a fix?

  2. Edoc said on August 24, 2013 at 12:14 pm
    Reply

    Firefox 23, still works :)

    Thanks

  3. Gggirleek said on November 24, 2012 at 9:31 pm
    Reply

    Userchrome edit works great in Firefox 16.01! Thanks!

    @Nathan: No elemhide.css file on my drive. Looks like it might be something for Adblock Plus though. Interesting that it worked for you.

  4. rahul said on June 3, 2012 at 9:13 am
    Reply

    thanks a lot

  5. Hafiz Bistar said on April 5, 2012 at 4:16 am
    Reply

    Thanks. it was really getting on my nerves..

    works on firefox 11

  6. Reiko said on March 14, 2012 at 3:32 pm
    Reply

    Works for me in Firefox 10 as well! Thank you!

  7. halt said on December 13, 2011 at 7:19 am
    Reply

    Thanks a lot! This tip has saved lives! (think about the precious seconds you saved for a lot of people all around the world, and you get that: whole lives ;-). BTW, I can confirm this works in FF 8.0

    Nowadays there are a lot of small screen devices that really need every bit of screen space for the web page itself. So it’s a good move to try to streamline the interface as possible. For instance, making some improvements to it, like putting into an overlay the information that used to be on the status bar, to get rid of it, for people who don’t need it, it’s a good approach.

    That said, there is a bunch of people who still need it, so you need to provide reasonable mechanisms to show it and hide it.

    Why they decided to treat that bar like the find bar instead of, say, like the bookmarks one, is something that I can’t understand by any means. You want it there all the time, or don’t want it at all; it’s not a bar which should appear only when you need some feature (In fact, the bookmarks bar has more odds for that than the add-ons bar).

    For the few people who really want that behavior, they surely use a shortcut instead of right-clicking on another bar and selecting it, so they probably use the same shortcut to close it. Then, why is that stupid button there? Does the bookmarks bar have it?

    If you really think that a graphical widget for that is so important, just copy the fringe that is used in the “All-in-one sidebar” (AiOS add-on) to control both the sidebar and/or the toolbar attached to it.

  8. Terry Cunningham said on November 8, 2011 at 4:40 am
    Reply

    Add another “Thank You” to the pile! I managed to close my add-on bar twice tonight, and decided that it was time to get rid of that darn close button. A Google search led me here, and a minute later the button was gone.

    Space Surfer: This fix DOES work with Firefox 7.0.1, so check your work. If you created a new userChrome.css file, make sure that you didn’t save it as userChrome.css.txt. Notepad will add .txt unless you choose “Save as type > All Files” when you save the userChrome.css file.

    1. Martin Brinkmann said on November 8, 2011 at 9:28 am
      Reply

      Glad that it worked out for your Terry. Good tip about the file extension.

  9. Space surfer said on October 23, 2011 at 8:52 pm
    Reply

    This doesn’t work for firefox 7. is there a work-around for firefox 7?

  10. ArgentSouL said on October 5, 2011 at 3:42 am
    Reply

    Thx dude, that button is stupid, this solved it, Works perfectly on firefox 7

  11. raw said on August 25, 2011 at 1:56 am
    Reply

    +1 Great tip. That icon is useless and annoying.

  12. Nathan said on July 26, 2011 at 1:50 pm
    Reply

    edited the file:
    elemhide.css instead in Firefox 5.0.1 for the same effect
    good stuff

  13. jim said on May 19, 2011 at 11:24 pm
    Reply

    Thanks, that button was driving me mad as it is right beside my search- on-page button and I always had to concentrate on clicking the right one.
    As a part of the UI, it makes no sense – it’s bad design.

  14. Anonymous said on May 10, 2011 at 1:32 am
    Reply

    Great. Works perfectly.

  15. Anonymous said on April 26, 2011 at 4:24 pm
    Reply

    thanx

    I do so love firefox. Find something that bothers you just do a simple google search, and voila the problem is fixed.

  16. Ralph GT said on April 12, 2011 at 12:57 pm
    Reply

    Thank you! That button was so irritating.

  17. Gino Strada said on April 7, 2011 at 12:24 pm
    Reply

    Thanks a lot.

  18. Jaden Kast said on March 27, 2011 at 9:48 pm
    Reply

    Thanks that was very helpfull. The button was very frustrating.

  19. Jose Manuel said on March 23, 2011 at 3:20 pm
    Reply

    Thanks for you code and thanks for stylish:

    #addonbar-closebutton {
    visibility: collapse !important;
    }

    Go well!!!!

  20. Mike said on December 26, 2010 at 9:14 pm
    Reply

    That’s weird. I’m running Minefield build 20101226, and I don’t have a close button in my add-on bar. Are you sure it’s not one of your extensions that’s causing it?

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.