What is the alternative to margin in HTML email?

Hotmail does not support margin in HTML emails. Is there an alternative?

+4
css html-email
Oct 19 '11 at 10:28
source share
3 answers

I would suggest using tables and playing with column widths. HTML letters are sometimes better with tables. Alternatively, you can take a look at the email that you have in your inbox that does what you want and check the source code.

Since this answer seems a bit vague, I would also like to point out a very complete answer , which describes in more detail the html email messages.

Note:

When it comes to HTML email, note that all of the best web development practices are out of the box.

+6
Oct 19 '11 at
source share

Here is an example of using tables,

<table border="0" cellspacing="0" cellpadding="0" align="left" style="width:600px;margin:0 auto;background:#FFF;"> <tr> <td colspan="5" style="padding:15px 0;"> <h1 style="color:#000;font-size:24px;padding:0 15px;margin:0;">Header</h1> </td> </tr> <tr> <td style="width:15px;">&nbsp;</td> <td style="width:375px;"> Left Column Content </td> <td style="width:15px;">&nbsp;</td> <td style="width:180px;padding:0 0 0 0;"> Sidebar Content </td> <td style="width:15px;">&nbsp;</td> </tr> <tr> <td colspan="5" style="padding:15px 0;"> <p style="color:#666;font-size:12px;padding:0 15px;margin:0;">Footer</p> </td> </tr> </table> 

Live here http://jsfiddle.net/Wr76m/

+2
Oct 19 '11 at 10:59 a.m.
source share

I managed to get away with transparent horizontal stripes, using a residence permit to change the height. For example:

 <hr style="border: transparent; padding: 1px;"> 
+1
Jun 22 '16 at 22:07
source share



All Articles