E-Mail background does not adapt to dark mode when using signature

Anonymous
2025-04-01T13:42:03+00:00

I created an e-mail signature to be able to include svg-graphics via graphic URLs and to implement a functionality that automatically switches between a light and a dark version of a company logo. Therefore I wrote the entire signature with html and css and included this code in the html-file of a newly created signature. When I now display the signature before sending, it looks and works just as I wanted it to look and work (formatting, hyperlinks, etc.). However, after receiving an e-mail written with this signature I noticed that the entire background of that e-mail is always white no matter if I am in light mode or dark mode and nothing I tried to fix it has worked. I know that html in Outlook signatures is prone to be problematic due to Outlook's use of the Word engine that interprets the language differently. Yet, I do not understand, why everything works just fine except for the background. I just added some class definitions to the head of the signature html-file and the code for the signature to the body. After trying to explicitely set the background to be transparent I received the same results.

Outlook | Windows | Classic Outlook for Windows | For home

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2025-04-06T14:14:21+00:00

    Dear Mats Weigel

    Thanks a lot for your feedback and patience! Very sorry for late reply!

    Based on your further description, I really want to help you, and I'm consulting your thread with my team members, and I'd like to share some more specific redirect information with you, but our forum lacks relevant permissions and tools, in fact Microsoft has a separate team resource where our most valuable professional engineers and members can provide possible information for your issue, then please trust that for the issue you mentioned, they can give you more professional support. So to help you better and not waste more of your time, I highly recommend you to create a service ticket in the Microsoft 365 admin center****to support > service requests through navigation, as they have more access permissions than on this forum, and professional engineers will further help you.

    Note: if you are not using admin account, please kindly ask admin within your organization for help. If you are not sure who is admin, please kindly refer to How do I find my Microsoft 365 admin? - Microsoft Support

    Sincerely hope that your problem will be solved as soon as possible! Wish you have a wonderful day!

    Sincerely

    Kerry Chen | Community Moderator

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2025-04-03T10:10:46+00:00

    I tried Inline CSS and also conditional comments, but the problem is, that the background color is always automatically set to white, even if I declare it specifically as another color. For example with the hmtl command the background of the entire signature is still displayed as white before AND after sending the e-mail in Outlook even though I get a fully yellow background when I open the file in the browser. So the first problem I now need to solve is to be able to actually set the colour in Outlook before I can troubleshoot further

    In the following I will provide the code for the body of the html-file (no changes made to the head) so you can test it yourself. (The first paragraph is highlighted in blue, to show, that Outlook still enables background colours for individual paragraphs.):

    nametitle

    Autohaus Meyer GmbHFriedrich-Vorwerk-Str. 12-1421255 Tostedt

    TelFax

    Mail MyMailwww.meyer-tostedt.de

    https://meyer-tostedt.de/https://meyer-tostedt.de/https://meyer-tostedt.de/![Website](https://meyer-tostedt.de/wp-content/uploads/2025/04/MeyerLogoDarkVector.svg)https://meyer-tostedt.de/https://meyer-tostedt.de/

    ![Instagram](https://meyer-tostedt.de/wp-content/uploads/2025/04/Instagram.svg)https://www.instagram.com/autohaus_meyer_gmbh/

    ![Facebook](https://meyer-tostedt.de/wp-content/uploads/2025/04/facebook.svg)https://www.facebook.com/meyertostedt/

    ![LinkedIn](https://meyer-tostedt.de/wp-content/uploads/2025/04/linkedin.svg)https://de.linkedin.com/company/autohaus-meyer-gmbh

    Please note: The formatting might be off now after copying the code to this post. That is fine, I am first and foremost only interested in a fix for the background color

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-04-01T14:13:12+00:00

    Dear Mats Weigel

    Have a nice day! Thank you for posting to the Microsoft community. We will be happy to help you!

    First of all, we regret for the inconvenience caused to your work. Based on your description, I have a general understanding of your question, seemly you've put a lot of effort into creating a dynamic email signature with HTML and CSS. The issue you're encountering with the background color not switching between light and dark modes is likely due to how Outlook handles HTML and CSS in email signatures. Outlook uses the Word engine to render HTML, which can lead to inconsistencies, especially with more advanced CSS features. Please kindly check whether following can help you

    1. Inline CSS: Outlook tends to handle inline CSS better than embedded or external styles. Try moving your CSS styles directly into the HTML elements as inline styles.
    2. Conditional Comments: Use conditional comments to target specific versions of Outlook. This can help you apply different styles for different versions of Outlook.
    3. Background Color: Instead of setting the background to be transparent, try explicitly setting the background color for both light and dark modes. You can use media queries to detect the user's color scheme and apply the appropriate background color.
    4. Fallback Colors: Provide fallback colors for your background. This ensures that if the preferred color isn't supported, a secondary color will be used.

    In addition, if you still need further help, then to help you better, I still need collect more information to narrow down the scope of question:

    Please kindly believe that I will do my best to do more research and testing to help you further when I get the feedback from you I need.

    Please note that our initial response does not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution.

    Thank you in advance for your understanding. Your patience and cooperation will be greatly appreciated. Hope for all the best!

    Sincerely

    Kerry Chen | Community Moderator

    Was this answer helpful?

    0 comments No comments