MozillaZine

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

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

Post Posted April 11th, 2019, 3:41 am

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: 4204
Joined: March 19th, 2005, 10:51 am

Post Posted April 11th, 2019, 6:01 am


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

Post Posted April 11th, 2019, 8:26 am

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: 3164
Joined: February 3rd, 2009, 6:29 pm

Post Posted April 11th, 2019, 8:32 am

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: 361
Joined: July 30th, 2013, 9:05 am

Post Posted April 11th, 2019, 9:11 am

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: 361
Joined: July 30th, 2013, 9:05 am

Post Posted May 11th, 2019, 6:48 am

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;
}

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 10 guests