0

I have tried the below code for background color for header in email template. The code is working fine for other email clients, but in outlook 2010 it won't show up background color at all. I have tried adding and removing 'px' but it did not make any difference. What change do I need to make to it to support in outlook 2010?

<div style="background-color: #xxxxx;" width="600" height="70"> </div>
Stranger
  • 147
  • 2
  • 15
  • 2
    Possible duplicate of [Div styles not working in Outlook Emails](https://stackoverflow.com/questions/27765493/div-styles-not-working-in-outlook-emails) – Adam Jun 07 '18 at 16:27
  • Is this div is placed inside table tag? but even if it was you should use table layout to built your emails – Adam Jun 07 '18 at 16:30
  • I just tried placing in the table tag, but it doesn't work either way! – Stranger Jun 07 '18 at 16:41
  • I added an answer thats working as I tested it in outlook 2010 – Adam Jun 07 '18 at 16:44

1 Answers1

3

You can replace it with this code below and use bgcolor in table tag or td tag or add style to table tag and include background style.

I also added Screenshot showing its working in outlook 2010

<table width="600" border="0" cellpadding="0" cellspacing="0" bgcolor="red" style="background: red;">
  <tr>
    <td height="70" bgcolor="red"></td>
  </tr>
</table>
Adam
  • 1,385
  • 1
  • 10
  • 23