Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Override colors in received HTML emails

  • 6 trả lời
  • 2 gặp vấn đề này
  • 27 lượt xem
  • Trả lời mới nhất được viết bởi Thunderbuntu

more options

I have thesame question as asked in a different forum but with no satisfactory answer: I would like to override default colors in received HTML emails. I modified my userContent.css accordingly. Basically, I need white text on dark background:

$ cat userContent.css body {

 color: white !important; 
 background-color: #303030 !important;

}

td {

 color: white !important;
 background-color: black !important;

}

This works OK for the background color, but the my desired font color (white) is often being ignored, even when I use !important.

As recommended in an answer I added:

  • {
 color: white !important;
 background-color: black !important;

}

But this is an overkill, too much of Thunderbird is made white on a black background. Is there another option to make just the text of the received html email with white font on dark background?

I have the[http://example.com same question] as asked in a different forum but with no satisfactory answer: I would like to override default colors in received HTML emails. I modified my userContent.css accordingly. Basically, I need white text on dark background: $ cat userContent.css body { color: white !important; background-color: #303030 !important; } td { color: white !important; background-color: black !important; } This works OK for the background color, but the my desired font color (white) is often being ignored, even when I use !important. As recommended in [http://example.com an answer] I added: * { color: white !important; background-color: black !important; } But this is an overkill, too much of Thunderbird is made white on a black background. Is there another option to make just the text of the received html email with white font on dark background?

Tất cả các câu trả lời (6)

more options

Why not set the colours in preferences and set the option to always apply. Edit > preferences> Display >formatting > colors

more options

@Matt Thank you for the response! I tried this and also the "Advanced" settings in Formatting but it does not work for some html email text. Any other tip?

Background: Thunderbird 68.7.0 (64-bit) in Ubuntu 19.10.

Được chỉnh sửa bởi user2481009 vào

more options

You would have to set things for each and every style. Basically it is not going to happen. So folks sending white test with no background set often get replies that there is not message body. Others manually specify black in their fonts and get a similar response as black on black is also invisible.

For instance if the text explicitly sets the font and color, no amount of CSS will over ride that really.

more options

@Matt Thanks for responding! This sounds not encouraging! Most of the text in the received html email is shown in readable matter but in some emails the text is dark (often dark blue) which is not helpful when you have a dark background. Interestingly it is mainly in emails sent by Outlook. But I wonder whether there is a not another parameter like body and td which would target specifically the text in html-emails. If I choose * as parameter like:

* {

color: white !important;
background-color: black !important;

}

All texts (also html email text) is white and I can read it well. This means the display of colour can be overridden. Do you know any possible parameter to target? I am happy to get several suggestions which I can try, I searched the internet for a hint but was not successful.

more options

You might try changing the colour of links in the preferences. dark blue is the default I think.

more options

Thanks Matt for your tip. I tried that but it does not make a difference. When I find time I will play with some html tags in userContent.css. Somebody sent me a link with some possible tags: https://www.w3schools.com/tags/default.asp

If you or anybody else any other hint, I would be delighted!