How to remove the x from Firefox tabs

How to remove the x from Firefox tabs


2 min read

Have you ever accidentally closed a very important tab in Firefox? Lost tons of work and time?

Well, so have I. And I HATE it.

A while back I tried using Vivaldi, a chromium-based browser that boasts "unrivaled customization options" simply because it would allow me to remove the annoying, easily clicked X-to-close button.

However, as with all chromium-based browsers, I inevitably got sick of the instability and gluttonous resource usage, and so I reverted to Firefox, AGAIN.

With this came back the same issue, the damn X-to-close button that I accidentally hit 10 times a day.

BUT, after some digging, I found that removing the X-to-close button in Firefox is entirely possible, and not too hard either!

So, here I am, sharing the love and showing you how to do that. Let's get started:

1. Type about:support into your address bar and press Enter

2. Locate the Profile Folder option and click Open Folder

3. Create a new folder called chrome (this is case-sensitive)

4. Now, go to and click Generate CSS file

5. After downloading the file, open it in a text editor and remove everything

6. Now, paste the following into the file and save it as userChrome.css

/*** Hide Tab Close buttons ***/ 
.tabbrowser-tab .tab-close-button {
 visibility: hidden !important; 

7. Copy the userChrome.css file into the chrome directory you created in step 3

8. Restart Firefox and voila, no more X-to-close button

Did you find this article valuable?

Support C0deR4t by becoming a sponsor. Any amount is appreciated!