0
<table cellpadding="0" cellspacing="0" class="auto-style1" style="width: 100%; height: 100%">
    <tr>
        <td>edtretrt</td>
    </tr>
</table>

Despite the fact that I specified that the height is 100% it doesn't fill the whole screen.

I want to use that table to set the background and because I want to send html email, I can't just change the background of the <body>

Cœur
  • 37,241
  • 25
  • 195
  • 267
user4951
  • 32,206
  • 53
  • 172
  • 282

1 Answers1

0

When you view that as a html file in your browser, your browser assumes it has a body and the body by default has some amount of margin. I can get rid of the border by specifying the body and removing the margin from the body. I also switched to a div instead of a table, to make the code simpler and removed margin from the div as well.

<body style="margin:0;">
<div style="width:100%;height:100%;background-color:orange;margin:0;">
edtretrt
</div>
</body>

I searched for changing background color of an email. It appears that most mail clients ignore or strip any body tags. It also appears that changing background colors in emails is not totally reliable. This site seems to indicate that you should use a table and you should use the bgcolor attribute with a six character color code to be supported by the largest number of mail clients: http://litmus.com/blog/background-colors-html-email

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109