html email sent to facebook address has style broken -
i wrote php script send message, html formatting , custom css styles, facebook user. message can seen in private message box. perfect if html formatting kept on. way found put style inline (as tag attribute) instead of writing internal style section or using external css file.
ex: <div style="width:100px">
but have 2 problems. image in img tag not display , cannot insert wrapper block fit whole message width.
how can properly?
not sure quirks facebook has, best practice include inline styling , using tables in html email. image work, needs hosted online, not embedded.
assuming facebook doesn't strip code out, simple table should fit width:
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#cccccc"> <tr> <td style="padding:20px; padding-bottom:0;"> <img style="margin: 0; border: 0; padding: 0; display: block;" src="http://lorempixel.com/400/200/sports/" width="400" height="200" alt=""> </td> </tr> <tr> <td style="font-family: helvetica, arial, sans-serif; font-size: 14px; color: #000000; padding:20px;"> content here. </td> </tr> </table>
note - not full html email structure, table should placed inside body section.
Comments
Post a Comment