html - Gmail Overriding font-family styles in tables -


for example if have:

<div style="font-family:'trebuchet ms';">     <table cellspacing="0" cellpadding="0">         <tr>             <td>text 1</td>             <td>text 2</td>         </tr>     </table> </div> 

gmail's styles override font-family set in div, if use !important. if try set font right in td elements this:

<div style="font-family:'trebuchet ms';">     <table cellspacing="0" cellpadding="0">         <tr>             <td style="font-family:'trebuchet ms';">text 1</td>             <td style="font-family:'trebuchet ms';">text 2</td>         </tr>     </table> </div> 

gmail strips contents of style attribute completely! same thing happens if try add table element, or span within td element.

though it's not standards-compliant, using font tag allows around this. example:

<div style="font-family:'trebuchet ms';">     <table cellspacing="0" cellpadding="0">         <tr>             <td><font face="trebuchet ms">text 1</font></td>             <td><font face="trebuchet ms">text 2</font></td>         </tr>     </table> </div> 

will work.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -