-5

I am testing my HTML email using http://www.emailonacid.com and Hotmail is causing problems.

This table is appearing as left aligned and I can't figure out why:

 <div align="center">
     <table align="center" width="200" style="background:red">
       <tr>
         <td>Please Help</td>
       </tr>
     </table>
 </div>

It looks fine in IE but not in FF.

marcy23
  • 123
  • 2
  • 10
  • Ok, I will try to be more specific next time and share my code but I am still very thankful for Bruce's answer below. In this case it was a valid issue and I hope this will help others who encounter the same problem. – marcy23 Sep 21 '11 at 19:22
  • 1
    This question is helpful. I'm dealing with the exact same issue - how to center html elements in hotmail email. – zero_cool Dec 10 '15 at 18:03

1 Answers1

5

Hotmail places your email inside a div with a class named “ExternalClass” - here are the properties they have set on that class:

    .ExternalClass{display:inline-block; line-height: 131%}; 

This has no effect on your email when using IE but every other browser the email will not be centered.

To overwrite this simply include this in your embedded CSS:

    .ExternalClass {width: 100%;} 

I found this to be a great resource for other similar Hotmail issues: Emailology.org

Bruce
  • 113
  • 5