Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29755

PHP email body background color not coloring whole mail

$
0
0

The background color only colors the first half of my email when I try to add background-color in my body.

$mail->Body =
  "<body style='background-color: #fbedde;'>
       <div style='width:800px; text-align: center; margin-left: auto; margin-right: auto;'>
          <img src='cid:logo' width='40%' style='margin-left: auto; margin-right: auto; padding-top: 20px; padding-bottom: 20px;'>
          <h1 style='color: #00a6a6; font-family: 'brandon_black'; letter-spacing: 2px; padding-bottom: 60px;'>COUPON CLAIMED</h1>
        <div style='padding-top:30px; width: 400px;float:left;'>
          <img src='cid:coupon' width='85%' style='padding-left: auto; padding-right: auto; border-radius: 2% !important; box-shadow: 0 2px 8px 0 rgba(0,0,0,0.2);'>
        </div>
        <div style='padding-top:15px; width: 400px; float:left; text-align: left; color: #00a6a6;'>
          <h3 style='font-weight: bold;'>Claimed By:</h3>
          <h2 style='font-family: 'brandon_black'; letter-spacing: 1px;'>$usr_fname $usr_lname</h2>
          <h3 style='font-weight: bold;'>$usr_contact</h3>
          <h3 style='font-weight: bold;'>$usr_member</h3><br>
          <h3>Please proceed to<h3>
          <a href='https://www.mywhitecard.ph/cms' style='color: #00a6a6; text-decoration: underline;'>https://www.mywhitecard.ph/cms</a>
          <h3>for scheduling of member.</h3>
        </div>
        </div>
        </body>";

I added the css directly into the tags because the css styles dont get recognized if taken from a different file since this is an html email.

1

I do not have any other background-color styles thats why I am questioning why the other half of my mail remains uncolored. Any help would be appreciated.


Viewing all articles
Browse latest Browse all 29755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>