css - HTML not displaying as expected in outlook -
i have following html:
<html> <table align="center" cellspacing="0" border="0" cellpadding="0" width="600" style="text-align: center;"> <tbody> <tr> <td valign="top" style="height:78px; width:528px"> <a href="link" style="display:block; height:78px; width:528px; color: #2a3379; text-decoration: none !important; padding-top:32px; font-family:arial; font-weight:bold; font-style:italic; border-radius:5px; font-size:40px; display:block; margin:0 auto; background-color:#b5e61d;"> apply </a> </td> </tr> </tbody> </table> </html>
which display in browser:
the problem is, when add html template email, displays in outlook:
from have read, know outlook not render html well. read not use css , inline styling - has not worked.
the email needs responsive, prefer not use image.
i guess there particular rule causing problem.
has come across before , found solution?
you have placed padding on , not td, thats issue here. have changed bit in bit getting work. regarding background color , height/width needs on td , not a. text related styles should there :)
<html> <table align="center" cellspacing="0" border="0" cellpadding="0" width="600" style="text-align: center;"> <tbody> <tr> <td align="center" valign="top" height="78" width="528" style="display:block; padding:32px 0px; display:block; background-color:#b5e61d; border-radius:5px;"> <a href="#" style="color: #2a3379; text-decoration: none !important; font-family:arial; font-weight:bold; font-style:italic; font-size:40px;"> apply </a> </td> </tr> </tbody> </table> </html>
as note, remember border-radius dosnt work in outlooks
Comments
Post a Comment