MozillaZine


CSS for Tooltip Color?

User Help for Mozilla Firefox
iamtotus
 
Posts: 7
Joined: November 1st, 2006, 9:33 pm

Post Posted March 13th, 2007, 2:18 pm

Ever since I installed a new windows theme my tooltip (is that what they're called?) colors have been all messed up. I know that there are firefox themes that can change tooltip colors, but I'd rather just do it in the usercontent.css file. Does anyone know the CSS attribute that pertains to tooltips? Here's an example of what I'm talking about.

<img src="http://i12.tinypic.com/450x2y9.jpg">

The thing that comes up when you hover over an image is all wrong. Ideally, I'd like white text on a black background. Thanks in advance.

smsmith
Moderator

User avatar
 
Posts: 19914
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Post Posted March 13th, 2007, 3:04 pm

The code will actually go into your userChrome.css, not your userContent.css.

Code: Select all
/* Recolor Tooltip */
tooltip {
  background-color: White !important;
  color: Black !important;
}

http://kb.mozillazine.org/UserChrome.css
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.

Guest
Guest
 

Post Posted March 13th, 2007, 3:09 pm

You'll probably need to use -moz-appearance as well:
Code: Select all
tooltip {
  -moz-appearance: none !important;
  background-color: #000 !important
  color: #fff !important
}

smsmith
Moderator

User avatar
 
Posts: 19914
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Post Posted March 13th, 2007, 3:21 pm

Hmm. You may be right there, guest. Good catch.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.

iamtotus
 
Posts: 7
Joined: November 1st, 2006, 9:33 pm

Post Posted March 13th, 2007, 3:21 pm

Worked perfectly, thanks guys.

Guest
Guest
 

Post Posted March 13th, 2007, 3:29 pm

smsmith wrote:Hmm. You may be right there, guest. Good catch.
Definitely if the default theme is being used. In the case of a custom theme, it just depends.

Related bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=161600

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot] and 11 guests