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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formating a HTML email

Status
Not open for further replies.

DotNetNewbie

Programmer
Mar 3, 2004
344
GB
Hi,

I would like to change the email module I have in my application to use HTML formated emails.

However I seem to have hit a small issue:

HTML does not recognise tabs (char(13)), so I thought I would use a table, but this seems to mess with the formating of the text and it does not align correctly.

How would you recommend formating the following text:

User1 : Bob
User2 : Claire
User3 : Darren

Ideally without borders and using a specific font (Arial).

Many thanks in advance.

.net
 
I would start by just adding the appropriate HTML tags. Something like this should work
Code:
[COLOR=#ff0000]<font face="Arial">[/color]
User1     : Bob[COLOR=#ff0000]<br>[/color]
User2     : Claire[COLOR=#ff0000]<br>[/color]
User3     : Darren
[COLOR=#ff0000]</font>[/color]

If you want to get something that is HTML standards compliant, you might ask this question in the HTML or similar forum.
 
Rg,

Thanks for your reply. Sadly using your example it strips out the additional spaces so leaves:

User1 : Bob
User2 : Claire
User3 : Darren

Though as you suggested I will pose this question in a HTML thread.

Cheers.

.net
 
just to save you posting in html forum - normally format stuff like this using html table tags - adjust the width as necessary in the td's
Code:
<table >
<tr>
	<td width=50>User1</td>
	<td>:</td>
	<td>Bob</td>
</tr>
<tr>
	<td>User2</td>
	<td>:</td>
	<td>Claire</td>
</tr>
<tr>
	<td>User3</td>
	<td>:</td>
	<td>Darren</td>
</tr>
</table>
 
HuggyBoy,

That actually works, many thanks. The only thing it does though is change the font back to Times New Roman :(

Any idea how I reset this for the table?

Cheers.

.net
 
Yep - as RiverGuy suggested put a font tag around the table start & end tags - i noticed it just after i posted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top