Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8426407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:31:37+00:00 2026-06-10T04:31:37+00:00

Firstly apologies with my limited knowledge, I am just starting out in CF. So

  • 0

Firstly apologies with my limited knowledge, I am just starting out in CF.

So I am trying to send out an html email with cfmail when a form query is satisfied.

The problem I am having is that the css I am embedding within the email head is either throwing up errors or just not formatting at all. Please could someone look at my code and tell me where I am going wrong.

Incidentally when I take out the # tags in the css it seems to work but the email sends with no formatting!!!

    <cfmail to="customer email" from="xxxxxxx@gmail.com" subject="Your order at has been shipped" type="html">
        <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Title</title>
<style type="text/css">
body {
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
}
body, td, th, input, textarea, select, a {
    font-size: 12px;
}
p {
    margin-top: 0px;
    margin-bottom: 20px;
}
a, a:visited, a b {
    color: #378DC1;
    text-decoration: underline;
    cursor: pointer;
}
a:hover {
    text-decoration: none;
}
a img {
    border: none;
}
#container {
    width: 680px;
}
#logo {
    margin-bottom: 20px;
}
table.list {
    border-collapse: collapse;
    width: 100%;
    border-top: 1px solid #DDDDDD;
    border-left: 1px solid #DDDDDD;
    margin-bottom: 20px;
}
table.list td {
    border-right: 1px solid #DDDDDD;
    border-bottom: 1px solid #DDDDDD;
}
table.list thead td {
    background-color: #EFEFEF;
    padding: 0px 5px;
}
table.list thead td a, .list thead td {
    text-decoration: none;
    color: #222222;
    font-weight: bold;
}
table.list tbody td a {
    text-decoration: underline;
}
table.list tbody td {
    vertical-align: top;
    padding: 0px 5px;
}
table.list .left {
    text-align: left;
    padding: 7px;
}
table.list .right {
    text-align: right;
    padding: 7px;
}
table.list .center {
    text-align: center;
    padding: 7px;
}
</style>
</head>
<body>
<div id="container">
  <p>Your Order has been Shipped</p>
  <table class="list">
    <thead>
      <tr>
        <td class="left" colspan="2">text_order_detail;</td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><b>text_order_id</b><br />
          <b>text_date_added</b><br />
          <b>text_payment_method</b><br />
          <b>text_shipping_method</b>
          </td>
        <td class="left"><b>text_email</b><br />
          <b>text_telephone</b><br />
          <b>text_ip<br /></td>
      </tr>
    </tbody>
  </table>
    <table class="list">
    <thead>
      <tr>
        <td class="left">text_instruction</td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left">comment</td>
      </tr>
    </tbody>
  </table>
  <table class="list">
    <thead>
      <tr>
        <td class="left">text_payment_address</td>
        <td class="left">text_shipping_address</td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left">payment_address</td>
        <td class="left">shipping_address</td>
      </tr>
    </tbody>
  </table>
  <table class="list">
    <thead>
      <tr>
        <td class="left">text_product</td>
        <td class="left">text_model</td>
        <td class="right">text_quantity</td>
        <td class="right">text_price</td>
        <td class="right">text_total</td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left">product
          <br />
          <small>option</small>
 </td>
        <td class="left">product['model']</td>
        <td class="right">product['quantity']</td>
        <td class="right">product['price']</td>
        <td class="right">product['total']</td>
      </tr>
    </tbody>
    <tfoot>
      <tr>
        <td colspan="4" class="right"><b>total['title']</b></td>
        <td class="right">total['text']</td>
      </tr>
    </tfoot>
  </table>
  <p>text_footer</p>
  <p>text_powered</p>
</div>
</body>
</html>
    </cfmail>
        </cfif>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:31:39+00:00Added an answer on June 10, 2026 at 4:31 am

    You should stick to inline styles for HTML emails rather than having your styles presented the way you are doing.

    E.G.

    <td style="padding:10px;"></td>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly apologies if this a very basic question, I'm just curious to know the
Firstly apologies if this is really simple but I have spent hours trying and
I wonder whether someone may be able to help me please. Firstly apologies as
I wonder whether someone may be able to help me please. Firstly my apologies.
I wonder whether someone may be able to help me please Firstly, my apologies
I wonder whether someone may be able to help me please. Firstly, my apologies
Firstly to show you what I am trying to achieve in the view, a
Firstly, apologies for all the XAML. I've tried for a few days to resolve
Firstly, apologies if I make a lot of mistakes in best VBA practice. I've
Firstly, apologies for the vague title, but I'm not sure exactly what I'm asking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.