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

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.
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
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?
Firefox 23, still works :)
Thanks
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.
thanks a lot
Thanks. it was really getting on my nerves..
works on firefox 11
Works for me in Firefox 10 as well! Thank you!
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.
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.
Glad that it worked out for your Terry. Good tip about the file extension.
This doesn’t work for firefox 7. is there a work-around for firefox 7?
Thx dude, that button is stupid, this solved it, Works perfectly on firefox 7
+1 Great tip. That icon is useless and annoying.
edited the file:
elemhide.css instead in Firefox 5.0.1 for the same effect
good stuff
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.
Great. Works perfectly.
thanx
I do so love firefox. Find something that bothers you just do a simple google search, and voila the problem is fixed.
Thank you! That button was so irritating.
Thanks a lot.
Thanks that was very helpfull. The button was very frustrating.
Thanks for you code and thanks for stylish:
#addonbar-closebutton {
visibility: collapse !important;
}
Go well!!!!
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?