Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing color of selected tab

367 views
Skip to first unread message

Jeff

unread,
Jan 16, 2007, 5:31:38 PM1/16/07
to
I am using FF 2.0.1 in Windows XP. I also have TabMixPlus 0.3.5.2 installed.

Before upgrading to vers 2, I used to have the background of the selected
(current) tab set to a different color to make it stand out. I believe I
did that by adding:

/* Change color of active tab */
tab{
-moz-appearance: none !important;
}
tab[selected="true"] {
background-color: rgb(195,212,195) !important;
color: navy !important;
}

/* Change colour of normal tabs */

tab:not([selected="true"]) {
color: gray !important;
}

to the userChrome.css in my profile. However when I added these lines to
the userChrome.css in FF 2, the background turns blue when downloading, but
then goes back to the same background color as the rest after the download
is over. Is there an error in the lines I added to the css file, or
something else I should do?

Thanks.

Jeff

Irwin Greenwald

unread,
Jan 16, 2007, 5:38:48 PM1/16/07
to
Check to se if TMP settings conflict with UserChrome.css. A simple way
to do this is to disable TMP.

--
Irwin

Please do not use my email address to make requests for help.

Knowledge Base: http://kb.mozillazine.org/Main_Page

Jeff

unread,
Jan 16, 2007, 6:01:24 PM1/16/07
to

I thought of that. When I disable TMP and restart FF 2, it still does not
work.

Could there be 2 Userchrome.css files in Windows and I modified the wrong
one?

Jeff


Jeff

unread,
Jan 16, 2007, 6:09:40 PM1/16/07
to

There were 2 userChrome-example.css files on my system:
C:\Documents and Settings\ etc. and one in C:\Program Files\Mozilla
Firefox\etc.
I put a copy of the modified userChrome.css in each folder that had a
userChrome-example.css and still no results.

Jeff


Nir

unread,
Jan 16, 2007, 6:47:22 PM1/16/07
to
tested your code in Minefield , works find ( I have also TMP installed ).
please note : 'userChrome.css' file should be located within 'chrome'
folder .
where 'chrome' folder will be within your current profile folder
["http://kb.mozillazine.org/Profile#Other_profiles" ]

Peter Potamus the Purple Hippo

unread,
Jan 16, 2007, 7:43:32 PM1/16/07
to
the one you should be looking at is the one within your profile, not in
the program directory.

I believe TMP can change tab colors, so why don't you look in that
instead of fiddling around with the css file.

--
Peter Potamus & His Magic Flying Balloon:
http://www.toonopedia.com/potamus.htm
http://www.bcdb.com/cartoon/46347-Peter_Potamus_Show.html
http://www.toonarific.com/show.php?s_search=Potamus&Button_Update=Search&show_id=2778

Please do not email me for help. Reply to the newsgroup only. Thanks

Jeff

unread,
Jan 17, 2007, 5:34:54 AM1/17/07
to

"Nir" <nir...@hotmail.com> wrote in message
news:1LudnYAfpYWa-TDY...@mozilla.org...

Thank you for taking the trouble. It is definitely in my profile folder's
chrome folder. Must have a conflict somewhere. TMP does not control the
color of the selected tab (that I can find).

Jeff

Jeff


Nir

unread,
Jan 17, 2007, 6:42:20 AM1/17/07
to

sorry for false confirm :( , Last two codes ( for text color ) works
fine . but 'background-color' isn't supported under Minefield ( and most
probably not in FF-2.0.0.1 ).
if you change value of background-color to 'red' , you will find red
border line ( at top and bottom of ) current tab.
The probable reason that i have found ( I'm not sure enough ), in
Minefield ( and in FF-2.0.0.1 ) tab color ( actually background color )
is set by image like 'tabbrowser-tabs-bkgnd.png' ( FF program folder >
chrome > classic.jar >skin>classic>global>icons )
I have checked TMP , it can change only tab text color , not background
color.
I think actually 'background-color' works but it is blocked by default
image
well , i will check again whether my statement is wrong or not

Nir

unread,
Jan 17, 2007, 6:45:02 AM1/17/07
to
I have found an extension 'Colorful Tabs' :
'https://addons.mozilla.org/firefox/1368/'
you may see it

Jeff

unread,
Jan 17, 2007, 9:27:34 AM1/17/07
to

"Nir" <nir...@hotmail.com> wrote in message
news:V76dnaVY5L0HljPY...@mozilla.org...

Thank you. Well at least it is not me going crazy! Yes, I knew that TMP
could not change background color.

I assume "Minefield" is a form of FF2 <grin>.

I do not wish to add more extensions and will therefore try the "red" option
you mention.

Jeff


Tony Mechelynck

unread,
Jan 17, 2007, 10:46:43 AM1/17/07
to

The following works for me, setting the background of the selected tab to
greyish-blue (in Firefox -- or BonEcho if you want to be pedant -- version
2.0.0.2pre, and also in SeaMonkey 1.5 alpha; the latter has the same rendering
engine as the current Fx 3.0 alpha nightlies):

/*
* highlight selected tab
*/
.tabbrowser-tabs *|tab[selected=true]
{ background-color: #699 !important
}


Notice the selector is slightly different from yours: in particular, it does
not rely on the tag name being exactly <tab> (which is what you do).

To change the apearance of unselected tabs, you could simply write

/*
* set tab background
*/
.tabbrowser-tabs *|tab
{ background-color: grey !important
}

but in such case the order of the rules becomes important: IIRC, the latter
rule should then go before the former in order to be overridden by it.


Best regards,
Tony.

Jeff

unread,
Jan 17, 2007, 12:23:19 PM1/17/07
to

"Tony Mechelynck" <antoine.m...@belgacom.net> wrote in message
news:CK6dnRYYHsL72TPY...@mozilla.org...

Thank you Tony

I am no expert in css files. There is definitely something weird or
conflicting in my setup. I entered


/*
* highlight selected tab
*/
.tabbrowser-tabs *|tab[selected=true]
{ background-color: #699 !important
}

to replace all my "Change color of active tab" entry but although there is
a darker line at the top of the selected tab the background color is still
the same as the others. I'm in Windows XP.

I temporarily installed an extension called "colorful tabs" and then
uninstalled it because it was too colorful for me. But it did work, so I
just don't know why my css file is not doing it.

Would you be willing to send me your entire userchrome.css file? Maybe
there is something else in mine that is messing things up.

Almost giving up!!

Jeff


Tony Mechelynck

unread,
Jan 17, 2007, 1:07:13 PM1/17/07
to
Jeff wrote:
[...]

> I am no expert in css files. There is definitely something weird or
> conflicting in my setup. I entered
> /*
> * highlight selected tab
> */
> .tabbrowser-tabs *|tab[selected=true]
> { background-color: #699 !important
> }
>
> to replace all my "Change color of active tab" entry but although there is
> a darker line at the top of the selected tab the background color is still
> the same as the others. I'm in Windows XP.

If the tab is displaying an image (such as a site icon) and is just as big as
the image, then the background will show only around the image and through its
"transparent" regions.

>
> I temporarily installed an extension called "colorful tabs" and then
> uninstalled it because it was too colorful for me. But it did work, so I
> just don't know why my css file is not doing it.
>
> Would you be willing to send me your entire userchrome.css file? Maybe
> there is something else in mine that is messing things up.

Sure. Download it from
http://users.skynet.be/antoine.mechelynck/other/userChrome.css

I've also uploaded my prefs.js (containing all nondefault about:config
settings) as http://users.skynet.be/antoine.mechelynck/other/prefs.js but
beware: it includes some _extremely_ long lines, courtesy of Adblock Plus. I
don't think it would be of much use to you.

My list of add-ons is at
http://users.skynet.be/antoine.mechelynck/other/My%20Config

>
> Almost giving up!!
>
> Jeff
>
>

Don't.

Best regards,
Tony.

David McRitchie

unread,
Jan 17, 2007, 2:55:28 PM1/17/07
to
Hi Jeff,
Look for the word "busy" for the second problem.

For the selected tab you have RGB(195, 212, 195)
which is a greenish gray, but don't think you
indicated what the Normal tab color is. Try using
#FFFFFF instead of RGB(195, 212, 195)
and see if the white tab shows up.

My userChrome.css can be seen at
http://www.mvps.org/dmcritchie/firefox/code/

Perhaps between Tony's and mine, it would be
almost as good as sending your userChrome to
someone to look at.
--
David McRitchie, most questions have been asked before.
Firefox customizations/extensions notes, see
http://www.mvps.org/dmcritchie/firefox/firefox.htm


Jeff

unread,
Jan 17, 2007, 7:03:36 PM1/17/07
to
David McRitchie wrote:
> Hi Jeff,
> Look for the word "busy" for the second problem.
>
> For the selected tab you have RGB(195, 212, 195)
> which is a greenish gray, but don't think you
> indicated what the Normal tab color is. Try using
> #FFFFFF instead of RGB(195, 212, 195)
> and see if the white tab shows up.
>
It does seem to be whiter background than I remember it being!!!! The
unselected tabs are such a light gray that it is still not much of contrast.
Instead of #FFFFFF what would be the entry for a darker gray - or better
still - where would I find the conversion table to pick another color?

Finally getting somewhere. Thank you very much.

Jeff


David McRitchie

unread,
Jan 17, 2007, 9:49:53 PM1/17/07
to

"Jeff" wrote ...

You can look quickly for a color on (web page)
http://www.mvps.org/dmcritchie/firefox/tabs.htm#userchrome
http://www.mvps.org/dmcritchie/excel/colors.htm

and RGB hex color chart (web page)
http://homepage.mac.com/jakesan/DHP/page0/page2/page2.html

If want a Color Picker that will work anywhere on the screen
cosmin.com - Color Detector
"Freeware program to detect the color of any pixel on the screen."
http://www.cosmin.com/colordetector/

The "Colorzilla" extension is nice but is limited to the body of
the Firefox window. Little window on status bar (see firefox.htm#colorzilla)
https://addons.mozilla.org/firefox/271/
on of many extensions referenced on my main page
http://www.mvps.org/dmcritchie/firefox/firefox.htm#colorzilla

Tony Mechelynck

unread,
Jan 18, 2007, 8:09:21 PM1/18/07
to
Jeff wrote:
[...]

> It does seem to be whiter background than I remember it being!!!! The
> unselected tabs are such a light gray that it is still not much of contrast.
> Instead of #FFFFFF what would be the entry for a darker gray - or better
> still - where would I find the conversion table to pick another color?
>
> Finally getting somewhere. Thank you very much.
>
> Jeff
>
>

Method I: There are a large number of predefined symbolic colour names. For
instance, "black" or "navy" means a very dark colour, "white" or "ivory" means
a very light colour. The full list takes up almost three full pages, one
colour per line with double linesapacing, in one of my reference books (in
some US format, slightly smaller than A4), so I'm not giving the full list
here. On some systems these names can be defined by means of a file named
"rgb.txt" and placed in some system directory such as /usr/X11R6/lib/X11/.

Method II: By colour values: In all cases it is red, green, blue components in
that order, and the higher number the brighter.

Hex 00-FF:
#2468CF means red 0x24, green 0x68, blue 0xCF

Decimal 0-255:
rgb(36,104,207) means the same

Decimal 0-100:
rgb(14%,40%,80%) means approximately the same

Hex 0-F:
#ABC means the same as #AABBCC. (NOT #A0B0C0 and of course not #0A0B0C.) For
instance, #000 means black and #FFF means white.


Note: "Safe" colours: The colours whose three components are each a multiple
of 0x33 (or a multiple of three in #xxx notation), are guaranteed to be shown
"natively", showing "reliably" the same colours, with no dithering, on all
computers having at least a 256-colour RGB screen. There are 216 such colours.


Best regards,
Tony.

Jeff

unread,
Jan 19, 2007, 5:49:56 AM1/19/07
to

Thank you.

Jeff


0 new messages