css - How to send image to email as position absolute with html text -
i'm trying send image position absolute html text behind image when send gmail or other email show image in bottom html text. absolute css not working.
below template
<template name="welcome"> <html> <head> </head> <body style="font-family: 'roboto slab', serif;"> <div class='container-fluid'> <img src="http://qa.couchfashion.com/images/mailer.png" style=" position: relative;width: 100%;left: 0;"> <div style="top: -44px;position: absolute;z-index: 999999;"> <div class='mailer-name text-center' > <h3 style=" font-size: 80px;"> hey {{receivername}} </h3> </div> <div class="mailer-content" style="margin-top: 120px; text-align: center; text-align: justify; padding-left: 10%; padding-right: 10%;"> <h1 class="text-center"> welcome couch </h1> <hr> <h3 class="text-center"> how use couch? </h3> <h2 class="text-center"> step 1 </h2> <h3 class="text-center"> browse products & articles </h3> <p>congratulations ladies! you've made first step of couch. step easiest step. sure have great time browsing through our products , articles best of them. make sure best gets best! </p> <h2 class="text-center"> step 2 </h2> <h3 class="text-center"> collect things love </h3> <p> hello again! here on second step. easy too. have click on love button collect favourite products , articles there. , there go. have own personalized collection. woo-hoo! </p> <h2 class="text-center"> step 3 </h2> <h3 class="text-center"> appreciation </h3> <p>this best step. flaunt beautiful talents ladies! people can see closet , have glance @ choice. isn't cool? can promote style , make popular. let's started ladies!</p> <h3 class="text-center"> signing </h3> <h3 class="text-center"> love & regards </h3> <h4 class="text-center"> team couch </h4> </div> </div> </div> </body> </html>
css position
not supported in email clients (both relative
, absolute
). best way achieve making image background image:
<table role="presentation" aria-hidden="true" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="600" style="margin: auto;" class="email-container"> <tr> <td background="http://qa.couchfashion.com/images/mailer.png" bgcolor="#222222" valign="middle" style="text-align: center; background-position: center center !important; background-size: cover !important;"> <div> <table role="presentation" aria-hidden="true" align="center" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="middle" style="text-align: center; padding: 15%ont-family: sans-serif; font-size: 15px;"> >> place text layout in tables instead of divs << </td> </tr> </table> </div> </td> </tr> </table>
it's still safer use <table>
s instead of <div>
s email, unless gmail client have support.
Comments
Post a Comment