How do I remove the X buttons in Firefox?

Viewed 1341

I went to my profile settings and added a folder called 'chrome' and a file called userChrome.css.

I included this code:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

#tabbrowser-tabs .tabbrowser-tab .tab-close-button { display:none!important; }

I restarted my Firefox instance and it still shows the X close button in the tabs.

2 Answers

Note: Firefox 69 and new versions will not support userChrome.css and userContent.css by default unless preference is set by the user.

To use userChrome.css follow below steps:

  • First type about:config in url/address bar
  • Then search for the property named toolkit.legacyUserProfileCustomizations.stylesheets
  • Set it to True and restart firefox

another solution ( use .tabClipWidth ) from here
https://support.mozilla.org/en-US/questions/1247072

// NOTE: this solution only hide other tabs close btn,
current tab's close button can't hidden.
// no need of CSS

  1. Enter about:config in your Firefox address bar
    Bypass the warning message

  2. Find the browser.tabs.tabClipWidth
    Change the value to a large number (for example, 1000000)

  3. Apply by Restart Firefox

Related