User Agents

Web browsers and everyday web tech, explained

Firefox Sidebars: How to Move Them from Left to Right

· 5 min read · Browsers

In this article
  1. Understanding Firefox Interface Customization
  2. Step-by-Step Guide to Moving the Sidebar
  3. How the CSS Modification Works
  4. Common Problems and Troubleshooting
  5. Comparing the Sidebar to Other Navigation Methods
  6. Safety and Stability Considerations
  7. Frequently Asked Questions

To move the Firefox bookmarks and history sidebars from the left to the right, you must use a custom CSS file called userChrome.css, as there is no built-in toggle in the standard settings menu. By adding a specific snippet of code to this file, you can force the sidebar to anchor to the right side of the browser window.

Understanding Firefox Interface Customization

Mozilla Firefox is designed with a high degree of flexibility, but some layout options are locked to maintain a consistent user experience. The sidebar—which houses Bookmarks, History, and Synced Tabs—is hard-coded to appear on the left by default. While most users are content with this, those using certain monitors or those who prefer a right-handed navigation flow often find the left-side placement disruptive.

Because this is not a standard preference, users must tap into the "userChrome" system. UserChrome.css is a powerful tool that allows you to override the browser's default styling (CSS) with your own rules. This doesn't change how the browser functions, but it changes how the visual elements are positioned and rendered on your screen.

Step-by-Step Guide to Moving the Sidebar

Since this process involves creating a hidden folder and a text file, follow these steps precisely to ensure the changes take effect.

  1. Enable Toolkit Legacy User Profiles: Open Firefox and type about:config in the address bar. Press Enter and click "Accept the Risk and Continue." Search for toolkit.legacyUserProfileCustomizations.stylesheets and double-click it to set it to true.
  2. Locate Your Profile Folder: Go to about:support in the address bar. Find the "Profile Folder" row and click the "Open Folder" (Windows) or "Show in Finder" (macOS) button.
  3. Create the Chrome Folder: Inside your profile folder, create a new folder and name it exactly chrome (all lowercase).
  4. Create the CSS File: Open the chrome folder. Create a new text file and name it userChrome.css. Ensure the file extension is .css and not .css.txt.
  5. Add the Code: Open userChrome.css with a text editor (like Notepad or TextEdit) and paste the following code:
    #sidebar-box {
      -moz-box-ordinal-group: 2 !important;
      -moz-box-ordinal-position: 2 !important;
    }
    
  6. Restart Firefox: Save the file and completely close and restart Firefox for the changes to apply.

How the CSS Modification Works

The code provided targets the #sidebar-box, which is the internal ID Firefox uses for the sidebar container. In the CSS Box Model used by the browser's interface, elements are assigned an ordinal group and position to determine their order from left to right.

By changing the -moz-box-ordinal-group and -moz-box-ordinal-position to a higher number (in this case, 2), you are telling the browser to render the sidebar after the main web content area rather than before it. The !important tag is necessary because it forces Firefox to prioritize your custom rule over the default internal stylesheet.

Common Problems and Troubleshooting

If the sidebar remains on the left after following the steps, check for these common issues:

  • Wrong File Extension: Windows often hides known file extensions. You might have accidentally named your file userChrome.css.txt. Check the file properties to ensure it is a CSS file.
  • Config Not Enabled: If toolkit.legacyUserProfileCustomizations.stylesheets is set to false, Firefox will ignore the chrome folder entirely.
  • Typing Errors: CSS is case-sensitive and symbol-sensitive. A missing curly bracket } or a misspelled ID like #side-bar-box will prevent the code from working.
  • Profile Mismatch: If you have multiple Firefox profiles, ensure you are adding the chrome folder to the specific profile you are currently using.

Comparing the Sidebar to Other Navigation Methods

Before committing to a CSS modification, it is helpful to consider if other built-in features meet your needs. While the right-side sidebar is visually preferable for some, other methods offer different advantages:

  • Bookmarks Toolbar: Located just below the address bar, this provides one-click access to top sites without taking up vertical screen real estate.
  • Library Window: Pressing Ctrl+Shift+O (Windows) or Cmd+Shift+O (macOS) opens the Library in a separate window, which is better for heavy organizing and folder management.
  • Searchable History: Using the address bar to search history (typing *keyword) is often faster than scrolling through a sidebar.

Safety and Stability Considerations

Modifying userChrome.css is generally safe because it only affects the visual presentation of the browser. It does not modify the core executable files or the browser's security protocols. However, because this is a "legacy" customization method, Mozilla may occasionally change the internal IDs of the interface during major updates.

If a Firefox update causes your sidebar to behave strangely or disappear, you can simply go back to your profile folder and delete the userChrome.css file or rename it to disable the modification. This will instantly revert the browser to its default factory layout.

Frequently Asked Questions

Can I move the sidebar back to the left?

Yes. You can either delete the userChrome.css file from your chrome folder or remove the specific block of code from the file and restart the browser.

Does this work on Firefox for Android or iOS?

No. The userChrome.css method only works on the desktop versions of Firefox (Windows, macOS, and Linux). Mobile versions do not support custom CSS for the interface.

Will this slow down my browser's performance?

No. The amount of code required to move the sidebar is negligible. It does not impact page load times or memory usage in any noticeable way.

Is there an extension that can do this instead?

No. Browser extensions are restricted to modifying the content inside the web page (the DOM), but they cannot change the browser's own user interface (the chrome). A CSS file is the only way to achieve this.

Do I need to be a coder to do this?

No. While it involves CSS, you do not need to understand the language. You only need to copy and paste the provided snippet into the text file as described.