Close Tab button on the left side of tab

Discussion of general topics about Mozilla Firefox
lousie
Posts: 4
Joined: March 1st, 2008, 10:59 am

Close Tab button on the left side of tab

Post by lousie »

Hello

Is there any chance to place 'close tab button' on the left side (Mac style) without installing any extensions?

I tried to edit userchrome.css but I haven't succeded.

Any idea?
Guest
Guest

Post by Guest »

Yeah, I'd like that, too!

Or failing that, we can wait for what I assume will be forthcoming-- updates to the extensions that do that!
Guest
Guest

Post by Guest »

userChrome.css:

Code: Select all

.tab-image-middle, .tab-image-right {
  -moz-box-ordinal-group: 2 !important;
}

.tab-image-middle {
  padding-left: .5em !important;
}


Make sure the file is named "userChrome.css"- mind the capital 'C'- and that it is in the correct location:
http://kb.mozillazine.org/UserChrome.css

If you're using a theme other than the default and the above CSS isn't working, post the theme title.
lousie
Posts: 4
Joined: March 1st, 2008, 10:59 am

Post by lousie »

Thx for your reply.

I'm using the latest nightly build. It comes with a native Mac OS X theme.

Your code works, but only for the tab which is highlighted after FF restart. When I click on another tab, then button is back on the right side.
User avatar
Dartman
Moderator
Posts: 11995
Joined: February 9th, 2006, 9:43 pm

Post by Dartman »

I'll move you to the forum where test builds are discussed.
Alcohol and Calculus don't mix. Never drink and derive.
User avatar
Orphu of Io
Posts: 172
Joined: December 3rd, 2007, 7:20 pm

Post by Orphu of Io »

I'm not on a Mac but maybe it will work the same:

Code: Select all

.tab-icon-image {
  -moz-box-ordinal-group: 2 !important;
}

.tab-text {
  -moz-box-ordinal-group: 3 !important;
}

.tab-close-button {
  margin-left: .5em !important;
}


The previous CSS I posted was for Firefox 2.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
User avatar
BostonPeng
Posts: 343
Joined: October 31st, 2007, 9:39 am
Location: Malden (Boston), MA
Contact:

Post by BostonPeng »

Stylish has the ability to do this if I remember right. I know I used a Stylish script to move the close tab buttons back to the right after a theme moved it to the left.
Proud Ubuntu Intrepid/Mac4Lin user, and Firefox 3 has gotten me to using Epiphany as my default browser so I check these forums a lot less often than I used to.
I used to be known as (Old)HardinComp | My Blog
lousie
Posts: 4
Joined: March 1st, 2008, 10:59 am

Post by lousie »

Orphu of Io wrote:I'm not on a Mac but maybe it will work the same:

Code: Select all

.tab-icon-image {
  -moz-box-ordinal-group: 2 !important;
}

.tab-text {
  -moz-box-ordinal-group: 3 !important;
}

.tab-close-button {
  margin-left: .5em !important;
}


The previous CSS I posted was for Firefox 2.


Now it looks like this:

Image
User avatar
Orphu of Io
Posts: 172
Joined: December 3rd, 2007, 7:20 pm

Post by Orphu of Io »

That's weird. I guess the original CSS I posted was closer for Mac on the latest nightly. With the original CSS, I get the same result as you when I only have the close button on active tabs. This might work, if not, we'll have to wait for a mac user to help.

Code: Select all

.tab-image-middle, .tab-image-right {
  -moz-box-ordinal-group: 2 !important;
}

.tab-image-middle {
  padding-left: .5em !important;
}

.tab-close-button {
  display: -moz-box !important;
  visibility: collapse !important;
}

tab[selected="true"] .tab-close-button {
    visibility: visible !important;
}
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
lousie
Posts: 4
Joined: March 1st, 2008, 10:59 am

Post by lousie »

Orphu of Io wrote:That's weird. I guess the original CSS I posted was closer for Mac on the latest nightly. With the original CSS, I get the same result as you when I only have the close button on active tabs. This might work, if not, we'll have to wait for a mac user to help.

Code: Select all

.tab-image-middle, .tab-image-right {
  -moz-box-ordinal-group: 2 !important;
}

.tab-image-middle {
  padding-left: .5em !important;
}

.tab-close-button {
  display: -moz-box !important;
  visibility: collapse !important;
}

tab[selected="true"] .tab-close-button {
    visibility: visible !important;
}



Works perfect now :)

Thanks a lot!
User avatar
Orphu of Io
Posts: 172
Joined: December 3rd, 2007, 7:20 pm

Post by Orphu of Io »

Great! I'm surprised though, lol.

Edit: I should mention that if you decide to display a close button on all tabs via browser.tabs.closeButtons, you'll need to remove the last two rules:

Code: Select all

.tab-close-button {
  display: -moz-box !important;
  visibility: collapse !important;
}

tab[selected="true"] .tab-close-button {
    visibility: visible !important;
}
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
Louise6380
Posts: 61
Joined: November 4th, 2007, 2:26 pm

Post by Louise6380 »

Orphu of Io wrote:That's weird. I guess the original CSS I posted was closer for Mac on the latest nightly. With the original CSS, I get the same result as you when I only have the close button on active tabs. This might work, if not, we'll have to wait for a mac user to help.

Code: Select all

.tab-image-middle, .tab-image-right {
  -moz-box-ordinal-group: 2 !important;
}

.tab-image-middle {
  padding-left: .5em !important;
}

.tab-close-button {
  display: -moz-box !important;
  visibility: collapse !important;
}

tab[selected="true"] .tab-close-button {
    visibility: visible !important;
}
This is great!
how can I make the tab bar more Safari like?
I would like the tab bar to have no favicons and throbber on the right, could that also be done with userChrome.css?
User avatar
Egidio
Posts: 2220
Joined: October 19th, 2007, 5:58 am
Location: Just a Mac user in Austin, TX
Contact:

Re: Close Tab button on the left side of tab

Post by Egidio »

lousie wrote:Is there any chance to place 'close tab button' on the left side (Mac style) without installing any extensions?


Though I really like the default theme in FF 3RC1, I really dislike the close button on the right side of the tab. It makes no sense to me why they did that. Having the button on the left-hand side makes it easier to close tabs no matter how large the tabs are. The close button will always be there on the left. So, once you close one tab, the others can be closed by just clicking your mouse -- no need to move it to find the close button.

Anyway, to have your close button on the left, just install the theme GrApple. There are 5 variations -- and all with the close button on the left. They are compatible with FF 3RC1.


.
Egídio
Mac OS X [10.6.4]
User avatar
alterna
Posts: 3993
Joined: January 16th, 2007, 8:27 am
Location: Big Apple

Post by alterna »

Louise6380 wrote:I would like the tab bar to have no favicons


/* hide all tab favicons 3.0 */
.tabbrowser-tab > .tab-icon-image { display: none !important; }

userChrome.css
Louise6380
Posts: 61
Joined: November 4th, 2007, 2:26 pm

Post by Louise6380 »

alterna wrote:
Louise6380 wrote:I would like the tab bar to have no favicons


/* hide all tab favicons 3.0 */
.tabbrowser-tab > .tab-icon-image { display: none !important; }

userChrome.css
thanks :)
Post Reply