Outlook HTML email margin spacing -


we have wysisyg editor users writes email content , clicks send, need html clean possible. e.g:

<p><a href="">nam velit metus</a>, vulputate eget sodales ut, dignissim vehicula nisi. lorem ipsum@dolor.com sit amet, consectetur adipiscing elit.</p>  <p>nunc pharetra luctus mi, sollicitudin ultrices lacus iaculis sed. nam aliquam, tortor id sodales scelerisque.</p> 

the problem outlook has dropped support margin/padding way round create content :

<table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="padding: 20px 0; text-align: left; font-family: helvetica, arial, sans-serif; font-size: 14px;  line-height: 18px;"><a href="">nam velit metus</a>, vulputate eget sodales ut, dignissim vehicula nisi. lorem ipsum@dolor.com sit amet, consectetur adipiscing elit.</td> </tr> <tr> <td style="padding: 20px 0; text-align: left; font-family: helvetica, arial, sans-serif; font-size: 14px;  line-height: 18px;">nunc pharetra luctus mi, sollicitudin ultrices lacus iaculis sed. nam aliquam, tortor id sodales scelerisque.</td> </tr> </table> 

so question better off trying to;

  1. edit wysisyg produces tables instead of paragraphs default. first @ going next impossible.
  2. or idea automatically edit html source before send, maybe checking 2 paragraphs , inserting spaces table in between e.g

     <p><a href="">nam velit metus</a>, vulputate eget sodales ut, dignissim vehicula nisi. lorem ipsum@dolor.com sit amet, consectetur adipiscing elit.</p>   <!--[if mso]>  <table cellpadding="0" cellspacing="0" width="100%"><tr><td height="20">&nbsp;</td></tr></table>  <![endif]-->   <p>nunc pharetra luctus mi, sollicitudin ultrices lacus iaculis sed. nam aliquam, tortor id sodales scelerisque.</p>  

i prefer method next question best applying fix outlook shown above or apply adding <p style="margin:0; padding:0;">.

for html email, should in tables. being said, can insert wysiwyg'ed content pre-existing <td> , should go.

at least 1 major email service provider know use <p> tags in wysiwyg. try adding <style> tag:

#outlook {padding:0;}

personally don't <p> tags in html. style code above may fix problems, haven't bothered check, find double <br> easier/quicker anyway.

here 3 common techniques vertical spacing:

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#cccccc">   <tr>     <td>  &nbsp;<br>      <!-- clients collapse empty rows, &nbsp; needed --> content here <br><br> more content here <br>&nbsp;       </td>   </tr> </table>  or  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#cccccc">   <tr>     <td style="padding-top:20px; padding-bottom:20px;">  content here <br><br> more content here      </td>   </tr> </table>  or  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#cccccc">   <tr>     <td height="20">&nbsp;   <!-- clients collapse empty rows, &nbsp; needed -->     </td>   </tr>   <tr>     <td>  content here <br><br> more content here      </td>   </tr>   <tr>     <td height="20">&nbsp;     </td>   </tr> </table> 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -