How Do I Change the Text Color in an Active Tab?

User Help for Mozilla Firefox
Post Reply
Wiggam72
Posts: 451
Joined: July 30th, 2013, 9:05 am

How Do I Change the Text Color in an Active Tab?

Post by Wiggam72 »

I saw another thread about changing the background color of an active tab. The .css code posted by RobertJ that works is:

/* ACTIVE TAB BACKGROUND COLOR */

.tab-content[selected="true"] {
background: rgba(65, 85, 145, 0.4) !important;
}

However, I would like to also change the font color of the active tab. What would be the code to change that? The code only addresses the background color.

BTW, don't know if it matters, but I'm using the Stylus theme 'phpBB - dark blue, simple' for this forum and a few other Stylus themes for other pages.
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: How Do I Change the Text Color in an Active Tab?

Post by Brummelchen »

Wiggam72
Posts: 451
Joined: July 30th, 2013, 9:05 am

Re: How Do I Change the Text Color in an Active Tab?

Post by Wiggam72 »

It doesn't work. I used color #0000FF. Did I put the code in the wrong place? I first hit the Enter button twice to start it double space from the last entry/code as is customary. When that didn't work, I started it on the same line as the last entry/code but that didn't work either.
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: How Do I Change the Text Color in an Active Tab?

Post by morat »

It works here.

Code: Select all

/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

.tab-content[selected="true"] {
  color: red !important;
  background-color: pink !important;
}
http://kb.mozillazine.org/UserChrome.css
Wiggam72
Posts: 451
Joined: July 30th, 2013, 9:05 am

Re: How Do I Change the Text Color in an Active Tab?

Post by Wiggam72 »

morat wrote:It works here.

Code: Select all

/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

.tab-content[selected="true"] {
  color: red !important;
  background-color: pink !important;
}
http://kb.mozillazine.org/UserChrome.css
Awesome Morat! Thanks! It works! =D>

My assumption was correct that I entered it in the wrong place. I also tested it by first switching from Red to Blue. I then switched to the code #0000FF. After that, I clicked on #0000FF in the .css color code link and ended up using Aqua. Aqua looks good with my setup. I might change it after trying other colors, but for now, that's what I'l use.

EDIT: I now switched to #7FFF00. It shows up a little better/less glare than Aqua. I'll reflect it in the code below. https://www.w3schools.com/cssref/css_colors.asp

Here's mine.

/* ACTIVE TAB BACKGROUND COLOR */

.tab-content[selected="true"] {
color: #7FFF00 !important;
background: rgba(65, 85, 145, 0.4) !important;
}
Wiggam72
Posts: 451
Joined: July 30th, 2013, 9:05 am

Re: How Do I Change the Text Color in an Active Tab?

Post by Wiggam72 »

After several weeks of trying different combinations, here's my latest code for the active tab. At least for now, this appears it will be my permanent code.

/* ACTIVE TAB BACKGROUND COLOR */

.tab-content[selected="true"] {
color: #7FFF00 !important;
background: rgb(0, 0, 0) !important;
}
Post Reply