Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFMAIL - Formatting HTML

Status
Not open for further replies.

TamedTech

IS-IT--Management
May 3, 2005
998
GB
Hi guys,

I've put together a nice little Newsletter App that lets me enter text into a form and then click send and it posts that along with some automated stuff from my database in a Newsletter e-mail.

The e-mail is HTML format, however i'm struggling to format the design of the e-mail.

Do I have to use tables and set styles as attributes or can i use CSS? i've tried attaching an external CSS sheet but it doesnt format the content.

Thanks,

Rob
 
Not to worry, figured it out.

ColdFusion obviously didnt like the #'s in my styles.

Try somthing along the lines of this inside you CFMAIL tags.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
       <title>My HTML Message</title>
       <style>
       TD {
       border : thin  dashed;
       border-color: 506968;
       background-color : 506968;
       font-family : sans-serif;
       color : White;
       padding : 8 8 8 8;
       }
       </style>
</head>
<body>
<table width="50%">
<tr>
       <td>Cui premo ullamcorper demoveo at pertineo abigo demoveo praesent, illum nisl ut gemino saluto. Dolus quidem pala ex sudo, quis dolore iusto in lucidus iusto. In macto neo ne at iusto eu, lenis.</td>
</tr>
</table>
</body>
</html>
 
Actually, it would probably be better to do this in your css:
Code:
border-color: ##506968;
If you put double ## signs, CF will convert it to a single # sign for html.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top