css - Email HTML signature adds blank HTML elements on web clients, causing layout to break -


i've been trying fix few hours already, , can't seem find problem.

i have html email signature has wrap on low resolution devices.

this mockup how should on large-screen devices: enter image description here

and mockup how should on small-screen devices: enter image description here

this markup:

<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">  <head> </head>  <body>   <table width="100%">    <tr>     <td>        <!-- text cell -->       <table align=left width=160>        <tr>         <td>           <p>             <span style='font-size:12.0pt;font-family:"times new roman","serif"; mso-fareast-font-family:"times new roman"'>sep</span>           </p>         </td>       </tr>     </table>      <!-- text cell -->     <table align=left width=160>      <tr>       <td>         <p>           <span style='font-size:12.0pt;font-family:"times new roman","serif";           mso-fareast-font-family:"times new roman"'>ult</span>         </p>       </td>     </tr>   </table>    <!-- text cell -->   <table align=left width=160>    <tr>     <td>       <p>         <span style='font-size:12.0pt;font-family:"times new roman","serif";         mso-fareast-font-family:"times new roman"'>tur</span>       </p>     </td>   </tr> </table>  <!-- text cell --> <table align=left width=160>  <tr>   <td>     <p>       <span style='font-size:12.0pt;font-family:"times new roman","serif";       mso-fareast-font-family:"times new roman"'>ura</span>     </p>   </td> </tr> </table> </td> </tr> </table> </body> </html> 

the problem web clients. reason, there's html element appended next each 1 of 4 tables: enter image description here

and these results:

ms outlook 2007 (properly displayed): enter image description here

apple gmail client (properly displayed , wrapped, since it's small-resolution screen): enter image description here

outlook web (there's html element breaks layout, details in pic): enter image description here

gmail web (somehow similar outlook web): enter image description here

i'd mention tested these litmus , looked good. i'm not sure why things different in these let's "real-world" situations.

could related process of putting html signature:

  1. open html page containing signature
  2. select content within page (ctrl+a)
  3. copy content (ctrl+c)
  4. open ms outlook 2007
  5. go tools -> options -> mail format -> signatures
  6. new signature -> paste content textarea -> save newly created signature.

i'm pretty confident asking can not done in outlook '07 in signature.

this because outlook '07/'10/'13 use microsoft word engine , add own junk after send (the p msonormal tags). because added after send, can not use inline css. in html email design, designers add styles style tag 0 out these unwanted tags in anticipation of outlook doing it's thing. wouldn't work because are using signature only. can try including <style> tag in signature html, i'm doubtful work.

the best suggestion have mimic kind of behavior &nbsp;. hack way, may option have "floating" if sending outlook '07. example:

<table width="100%" border="0" cellpadding="0" cellspacing="0">   <tr>     <td>       text&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       text&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       text&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       text&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     </td>   </tr> </table> 

something might work, (definitely lot neater) haven't tested it:

<table width="100%" border="0" cellpadding="0" cellspacing="0">   <tr>     <td>       <span style="width:150px;">text 1</span>       <span style="width:150px;">text 2</span>       <span style="width:150px;">text 3</span>       <span style="width:150px;">text 4</span>     </td>   </tr> </table> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -