Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Trying to set my tab close button to the left

more options

I am using theme called WhiteSur to imitate Safari, as that is the browser layout I prefer. However, this doesn't change the position of the close tab button and leaves it on the right hand side. I found a way to change it, using the code .tabbrowser-tab .tab-close-button {

 margin-left: -5px !important;
 margin-right: 2.5px !important;

} Unfortunately, this doesn't change based on the size of the tab, so if I set it to a size that is good for only having 1 tab, it will look bad or be off the screen for the other amounts of tabs. Is there a way to detect the width of the tab or the amount of tabs open and dynamically set the margins based off of this? So I could set it as (width-of-tab)-x and that would always keep the close tab button in the same spot, regardless of tab size. Thanks!

I am using theme called WhiteSur to imitate Safari, as that is the browser layout I prefer. However, this doesn't change the position of the close tab button and leaves it on the right hand side. I found a way to change it, using the code .tabbrowser-tab .tab-close-button { margin-left: -5px !important; margin-right: 2.5px !important; } Unfortunately, this doesn't change based on the size of the tab, so if I set it to a size that is good for only having 1 tab, it will look bad or be off the screen for the other amounts of tabs. Is there a way to detect the width of the tab or the amount of tabs open and dynamically set the margins based off of this? So I could set it as (width-of-tab)-x and that would always keep the close tab button in the same spot, regardless of tab size. Thanks!

所有回覆 (4)

more options

You can use the order property to slide the close button to the first position in the tab. Strange things were happening when I hover the button, so everything after the first line was intended to address that:

/* Move tab close button to left side of tab */
.tabbrowser-tab .tab-close-button {
  order: -1;
  /* Prevent movement when hovering */
  width: 24px !important;
  padding-left: 6px !important;
  margin-left: -4px !important;
  margin-right: 0 !important;
}

有幫助嗎?

more options

So I tried that, and you can see what I got in the screenshot below. The x is centered instead of on the left. It's progress since its centered regardless but still not quite what I want. I tried playing with some of the values, but I wasn't able to put it on the left instead of the center. Any ideas?

有幫助嗎?

more options

Sorry, I tested with zero other modifications. You seem to have some other rules changing your tabs.

(I should add: I run Windows, so I don't use Safari.)

由 jscher2000 - Support Volunteer 於 修改

有幫助嗎?

more options

Is it this one? It has a file for moving the close button to the left, but there is a bug with it since, reportedly, Firefox 113. You may want to follow up with the developer and see whether any progress is expected:

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題