29

My problem is related to Microsoft Outlook 2010. Actually I want to publish my HTML newsletter in Outlook 2010, but the main problem which I am facing is styling problem it's not showing color and all when the newsletter is published in Outlook 2010. please help me out if you know how to set color and css style in Outlook.

NehaKharkwal
  • 293
  • 1
  • 3
  • 4

5 Answers5

49

This method works across email clients:

<table bgcolor="#3399ff" style="background:#3399ff;"><tr><td>test</td></tr></table>
marissajmc
  • 2,583
  • 1
  • 22
  • 19
  • 4
    Make sure you use the hex value as shown above. Named colors (i.e. "grey") are inconsistently supported across various versions of Outlook. – Whatever Man Apr 18 '15 at 17:59
  • 2
    Is there any issue using "background:" as opposed to the more explicit "background-color:" ? – Kalnode Sep 12 '19 at 00:49
  • @WhateverMan Honestly, why did Microsoft this? The older versions of Outlook are such a pain. I was using the name of the colour and until I read your hint I never thought about such stupid reason why it was ignored. – Peter VARGA Jun 21 '21 at 19:09
3
<table><tr><td bgcolor="#3399ff">test</td></tr></table>

This will NOT work on Outlook 2010. If you want to style background-color in Outlook, you'll have to put your background style in style attribute, like this

<table><tr><td bgcolor="#3399ff" style="background-color:#3399ff">test</td></tr></table>

Plus: If you want to style background IMAGE (not color), default Outlook 2007+ will not support it, but you can do some tricks to make that happen. Check out this link : https://litmus.com/community/learning/25-understanding-background-images-in-email http://backgrounds.cm/

tucq88
  • 417
  • 4
  • 7
3

I was struggling with the same issue and found out that Outlook doesn't support the name of the color like modern browsers. I changed:

<tr style="background-color: lightgray">

to

<tr style="background-color: #d3d3d3">

and Outlook loved it.

2

You can also do it this way - styling in the td cell.

<table><tr><td bgcolor="#3399ff">test</td></tr></table>
mmmmmm
  • 32,227
  • 27
  • 88
  • 117
ajcoder
  • 61
  • 3
1

the background-color property works in Outlook 2010.

reference: http://www.campaignmonitor.com/css/

Pietro Ferrero
  • 476
  • 2
  • 10