Link to home
Start Free TrialLog in
Avatar of conlin
conlinFlag for Afghanistan

asked on

Outlook Stationary HTML Code

I got a good one for you guys.

Our client wants to use a stationary in Outlook that has an image at the top and centered.  Shouldn't be too hard right? Wrong!  The stationary uses an IMG tag which does not allow me to center percentage wise, only in pixels (hspace=).  But if someone is using a different resolution than me then the image would be off-centered.  I can get the image centered in XML but then Microsoft Word cannot read XML so then the image does not show up at all in Outlook.  Here is the code produced by Outlook when creating the stationary.  Thanks in advance

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Tisch Stationery</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.5346.5" name=GENERATOR></HEAD>
<BODY style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial"
background=""><FONT face=Arial color=#000000 size=2>
<DIV><IMG alt="" hspace="" src="N:\image002.jpg" align=top
border=0></DIV></FONT></BODY></HTML>
ASKER CERTIFIED SOLUTION
Avatar of dfu23
dfu23

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ziwez0
ziwez0

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Tisch Stationery</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.5346.5" name=GENERATOR></HEAD>
<BODY style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial"
background=""><FONT face=Arial color=#000000 size=2>
<DIV><center><IMG alt="" hspace="" src="N:\image002.jpg" align=top
border=0></center></DIV></FONT></BODY></HTML>
If those don't work you could try:
<DIV style="margin: 0 auto; text-align: center;">
That is a common way to center a <div>.

Joe P
Outlook can be a nightmare, as it re-writes the email before sending which means even if you get this looking correct on the senders system, it may be wrong on the recipients system.

You can add style="..." on almost anything in outlook; but it may or may not get kept (it seems a little bit random!)

It may be best to use <center> tags AND style="margin:0 auto; text-align:center;"
Avatar of conlin

ASKER

This works but now when I add a signature to the email it puts the signature above the stationary that I want at the top!
Can you put your signature right into the email!?
That would pretty cool =) and it then would not be a problem with something you cannot control.

Joe P
By "right into the email" I meant right into the HTML.