I am trying to apply, some styles in HTML. like positioning the content etc.
I can over lay the text on the image, using the auto code generated by bulletproof website. but cannot apply the styles on the text.
I have following snippet of HTML in email:
Here's the server code for creating email:
MimeMultipart mimeMultipart = new MimeMultipart("related");
MimeBodyPart textBodyPart = new MimeBodyPart();
mimeMultipart = new MimeMultipart("related");
String cid = ContentIdGenerator.getContentId();
textBodyPart.setText(messageBody, "US-ASCII", "html");
mimeMultipart.addBodyPart(textBodyPart);
imagePart.attachFile(file);
imagePart.setContentID("<" + cid + ">");
mimeMultipart.addBodyPart(imagePart);
 msg.setContent(mimeMultipart);
  Transport.send(msg);
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns:v="urn:schemas-microsoft-com:vml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
 </head>
 <body>
  <table cellpadding="0" cellspacing="0" border="0" width="100%">
   <tr>
    <td background="cid:random number.net"
     style="background-repeat:no-repeat;" valign="top">      <!--[if gte mso 9]><v:rect xmlns:v='urn:schemas-microsoft-com:vml' fill='true' 
      stroke='false' style='mso-width-percent:1000;'> <v:fill type='frame' src='cid:ransomnumbernet' 
      style='background-repeat:no-repeat;' /><v:textbox style='mso-fit-shape-to-text:true' 
      inset='0,0,0,0'><![endif] -->
     <div style="margin-left: 2cm;">
      <br>
       <br>
        <br>
         <br>
          <br>
           <br>
            <br>
             <br>
              <br>
               <br>
                <br>
                 <br>
                  <br>
                   <br>
                    <br>
                     <p>Thank you for your order. Your order information
                      is:</p>
                     <br>
                      <table width="50%" colspan="2">
                       <tbody>
                        <tr>
                         <td width="30%" align="left">order</td>
                         <td width="70%" align="left">XXXX</td>
                        </tr>
                        <tr>
                        
                       </tbody>
                      </table>
                      <table width="50%" colspan="2">
                       <tbody>
                        <tr>
                         <td width="30%" align="left">Name</td>
                         <td width="70%" align="left">temp</td>
                        </tr>
                        <tr>
                         <td width="30%" align="left">Phone</td>
                         <td width="70%" align="left">555-555-5555</td>
                        </tr>
                       </tbody>
                      </table>
     </div><!--[if gte mso 9]> </v:textbox></v:rect><![endif] -->
    </td>
   </tr>
  </table>
 </body>
</html>but the styles don't apply in the email.
Thanks in advance for your time.
 
    