开发者

Using CSS & HTML with MFMailComposeViewController

开发者 https://www.devze.com 2023-01-26 17:23 出处:网络
My CSS formatting is lost when i use it with MFMailComposeViewController.Below is my sample code. I just insert my table data under the body section.

My CSS formatting is lost when i use it with MFMailComposeViewController. Below is my sample code. I just insert my table data under the body section.

<html>
<head>
  <style type="text/css">
    #customers {
      font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
      width: 100%;
      border-collapse: collapse;
    }
    #customers td,
    #customers th {
      font-size: 1em;
      text-align: right;
      border: 1px solid #999999;
      padding: 10px 25px 5px 25px;
    }
    #customers th {
      font-size: 1.1em;
      text-align: center;
      padding: 10px 25px 5px 25px;
      background-color: #ffffff;
      color: #000000;
    }
  </style>

</head>

<body>

  %@

</body>

</html>

I am setting the "isHTML=YES" while composing the email. Am i missing something or is this method of using CSS not supported on the i开发者_如何学Gophone using MFMailComposeViewController


I'm not clear, but are you putting your CSS inside the <body> or <head>? I believe MFMailComposeViewController needs to have CSS defined inside the <body></body> tags.

0

精彩评论

暂无评论...
验证码 换一张
取 消