title: Inline css styles are not applying corretly while sending html email
body: <p>I'm trying to send a mail with html through C# code but it is not rendering correctly on Gmail. Can some let me know what i'm doing wrong..</p>
  
  <pre><code> MailMessage msg = new MailMessage();
  
          msg.From = new MailAddress("no.reply.checkarr@gmail.com");
          msg.To.Add(ReciverMail);
          msg.Subject = title;
  
  
          String bodyBuilder = "";
  
          bodyBuilder += "&lt;div style = \"font - family: Calibri, Arial; background - image: url('https://www.aqeqah.com/wp-content/uploads/pattern-07.jpg'); background - color: transparent; background - position: center center; background - repeat: repeat; background - attachment: fixed; position: fixed; width: 100 %; height: 100 %; left: 0; top: 0; \"&gt;";
          bodyBuilder += "    &lt;div style = \"margin: 0 auto; width: 90 %; border: 1px solid grey; text - align: center; background - color: white; border - radius: 5px; margin - top: 5 %; box - shadow: 0 16px 26px 0 rgba(0, 0, 0, 0.2), 0 6px 26px 0 rgba(0, 0, 0, 0.19); \"&gt;";
          bodyBuilder += "        &lt;h1 style = \"color: #ff1017;\"&gt;Checkarr&lt;/h1&gt;";
          bodyBuilder += "        &lt;p style = \"padding - left: 5 %; padding - right: 5 %; \"&gt;We are sending this mail to you to inform about important updates for your account&lt;/p&gt;";
          bodyBuilder += "        &lt;h2&gt;Account Verification&lt;/h2&gt;";
          bodyBuilder += "        &lt;p style = \"padding - left: 5 %; padding - right: 5 %; \"&gt;It looks like it's a great time to verify your account. Verified account are subjected to get best out of our services. Either use the following code to verify your account or click the button.&lt;/p&gt;";
          bodyBuilder += "        &lt;h3 style=\"color: grey; border: 3px dashed #ff1017; width: 100px; height: 30px;margin:0 auto; padding-top: 10px; border-radius: 5px\"&gt;ASDF32&lt;/h3&gt;";
          bodyBuilder += "        &lt;p style = \"color: grey\"&gt; OR&lt;/p&gt;";
          bodyBuilder += "        &lt;button style=\"background - color: #ff1017;border: none;color: white;padding: 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;border-radius: 5px;cursor: pointer;\"&gt;Verify Account&lt;/button&gt;";
          bodyBuilder += "    &lt;p&gt;Stay awesome!&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;";
          bodyBuilder += "    &lt;p style = \"color: grey; font - size: 10px\"&gt;This is auto generated mail. Please don't reply&lt;/p&gt;";
          bodyBuilder += "    &lt;p style = \"color: grey; font - size: 10px\"&gt;Checkarr © - Islamabad, Pakistan &lt;/br&gt;www.checkarr.pk&lt;/p&gt;";
          bodyBuilder += "    &lt;/div&gt;";
          bodyBuilder += "&lt;/div&gt;";
  
  
  
          msg.Body = bodyBuilder;
          msg.IsBodyHtml = true;
          SmtpClient client = new SmtpClient();
          client.UseDefaultCredentials = true;
          client.Host = "smtp.gmail.com";
          client.Port = 587;
          client.EnableSsl = true;
          client.DeliveryMethod = SmtpDeliveryMethod.Network;
          client.Credentials = new NetworkCredential("no.reply.checkarr@gmail.com", "/*PASS REMOVED*/");
          client.Timeout = 20000;
          try
          {
              client.Send(msg);
              System.Diagnostics.Debug.WriteLine("Mail has been successfully sent!");
          }
          catch (Exception ex)
          {
              System.Diagnostics.Debug.WriteLine("Exception while sending mail" + ex.Message);
          }
          finally
          {
              msg.Dispose();
          }
  </code></pre>
  
  <p><strong>How it looks on gmail</strong></p>
  
  <p><a href="https://i.stack.imgur.com/ajsEm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ajsEm.png" alt="outcome"></a></p>
  
  <p>** html view from browser-- how it should be **</p>
  
  <p><a href="https://i.stack.imgur.com/xnOgt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xnOgt.png" alt="enter image description here"></a></p>