User Agents

Web browsers and everyday web tech, explained

How to Change Tab Width or Length in Firefox

· 5 min read · Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide shows you how to adjust the width and length (height) of tabs in Mozilla Firefox. By default, Firefox uses a fixed tab width that shrinks as you open more tabs, and the tab bar height is set to a standard size. You can override these with a few simple changes to Firefox's advanced configuration, giving you wider tabs that are easier to read or a more compact tab bar to save vertical space. No add-ons are required—just a few minutes and a willingness to tweak a hidden setting.

What You'll Need

  • A recent version of Mozilla Firefox (the steps work on Firefox 90 and newer).
  • Access to Firefox's hidden configuration page (about:config).
  • Basic comfort with copying and pasting text.

Step-by-Step

  1. Open Firefox's advanced settings. Type about:config in the address bar and press Enter. If a warning page appears, click the “Accept the Risk and Continue” button.
  2. Search for the tab width preference. In the search box at the top of the about:config page, type browser.tabs.tabMinWidth. This is the minimum width (in pixels) that a tab can shrink to when many tabs are open. The default is usually 76.
  3. Change the minimum tab width. Click the edit (pencil) icon next to the preference. Enter a new value. For example, set it to 100 for wider minimum tabs, or 50 for narrower ones. Click the checkmark to save.
  4. Adjust the maximum tab width (optional). Search for browser.tabs.tabMaxWidth. This sets the maximum width a tab can grow to when you have few tabs open. The default is 250. Increase it to, say, 300 if you want tabs to fill more space when you have only a few open.
  5. Change the tab bar height (length). Firefox does not expose a direct preference for tab bar height, but you can use a CSS override. First, enable user styles: type about:config again, search for toolkit.legacyUserProfileCustomizations.stylesheets, and set it to true by double-clicking it.
  6. Locate your Firefox profile folder. Type about:support in the address bar. Under “Profile Folder,” click the “Open Folder” button (on Windows) or “Show in Finder” (on Mac). This opens the folder where your Firefox data is stored.
  7. Create or edit the userChrome.css file. In the profile folder, open the chrome folder (if it doesn't exist, create it). Inside it, create a file named userChrome.css (if it doesn't exist). Open it with a text editor (like Notepad).
  8. Add CSS to adjust tab height. Paste the following lines into the file:
    /* Make tabs shorter */
    .tabbrowser-tab { max-height: 30px !important; min-height: 30px !important; }
    
    /* Or make tabs taller */
    /* .tabbrowser-tab { max-height: 45px !important; min-height: 45px !important; } */
    Adjust the pixel value (30px or 45px) to your liking. The default is usually around 33-36px. Save the file.
  9. Restart Firefox. Close and reopen Firefox for the CSS changes to take effect. The tab bar height should now reflect your custom value.

Common Mistakes

  • Not enabling legacy stylesheets: If you skip step 5, Firefox ignores userChrome.css entirely. Make sure toolkit.legacyUserProfileCustomizations.stylesheets is set to true.
  • Editing the wrong profile: If you have multiple Firefox profiles, you might edit the wrong one. Always check the path in about:support to confirm you're in the correct folder.
  • Using incorrect CSS syntax: A missing semicolon or a typo in the selector can break the CSS. Copy the code exactly as shown, and avoid adding extra spaces.
  • Setting extreme values: Setting tabMinWidth to 0 can make tabs impossible to click, and setting max-height too small can make the tab text unreadable. Stick to reasonable values (e.g., 50–150 for min width, 20–50px for height).

Tips

  • Use the tab bar’s scroll buttons: If you make tabs very wide, you may get a scroll arrow on the tab bar. You can still access all tabs by clicking that arrow or using the Ctrl+Tab shortcut.
  • Combine with tab overflow settings: If you want tabs to shrink less, also consider setting browser.tabs.tabClipWidth to a higher value. This controls when the tab close button disappears (default is 64).
  • Test in a new window: After changing CSS, open a new Firefox window to see the effect without closing your current session.
  • Back up your userChrome.css: If you later update Firefox and the CSS breaks, you can quickly revert by renaming the file.

Troubleshooting

Changes don’t apply after restart: First, confirm that toolkit.legacyUserProfileCustomizations.stylesheets is set to true. Then verify that the file is named exactly userChrome.css (not userChrome.txt) and that it’s in the chrome folder inside the correct profile. If it still doesn’t work, try removing the /* comment markers around the “taller” line to test if the CSS is being read at all.

Tabs become too small to click: If you set tabMinWidth too low, tabs may become tiny. Go back to about:config and reset the value to 76 or higher. If you can’t click the tab, use the keyboard shortcut Ctrl+W to close the current tab, then change the setting.

Tab bar height changes but tabs look odd: Some themes or extensions override the CSS. Try disabling your theme or add-ons temporarily to see if they conflict. If they do, you may need to use a more specific CSS selector, such as .tabbrowser-tab:not([pinned]).

Firefox updates reset the CSS: Firefox updates sometimes change internal element names. If your CSS stops working after an update, check the Firefox version and search online for updated selectors, or revert to the default height.

Frequently Asked Questions

Can I change tab width without using about:config?

No, Firefox does not offer a standard settings menu option for tab width. The only way is to edit the preferences in about:config or use a CSS override.

Will changing tab width affect my bookmarks or history?

No, these changes only affect the visual appearance of the tab bar. Your bookmarks, history, and other data remain untouched.

Do I need to restart Firefox after changing tabMinWidth?

No, changes to tabMinWidth and tabMaxWidth take effect immediately. However, changes to userChrome.css require a restart.

Can I set different tab widths for different windows?

No, the preferences apply globally to all Firefox windows. If you want per-window differences, you would need a separate profile for each window, which is not practical.

Is there a way to make tabs scroll instead of shrink?

Yes, you can set browser.tabs.tabMinWidth to a high value (e.g., 100) and then enable scrolling by setting browser.tabs.tabManager to true (if available) or by using the built-in scroll arrows that appear when tabs overflow.

Will these changes slow down Firefox?

No, these are simple preference changes and CSS overrides. They have no noticeable impact on performance.