When Outlook 2007 ignores css, how to specify the font size?

I have two Windows computers, like with Outlook 2007. I am sending as an HTML email with things like:

<div style='font-family:Times New Roman,Serif;font-size:11pt'> ... 

I need the font Times New Roman, 11pt. In one Outlook, it correctly displays as Times 11pt, in another - Arial 12pt. I can get the second one to display Times using the surrounding content with a tag, for example:

 <font face='Times New Roman' size='3'>... 

But size is matched with 12pt, and size = 2 is 10pt. I still do not see a way to specify the size in px or pt. This tag is troubling because we are in 2013.

I understand that rendering Outlook HTML email is a disaster because it prefers Word over IE for rendering. But why the difference? And can I do something to make the second copy of Outlook look like the first? Or is there another way to say this: "11pt".

Here is my last attempt at HTML sent to Exchange ...

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <style> body, div, p, table, td { font-family:TimesNewRoman, "Times New Roman", Times, Serif; } </style> </head> <body style='font-family:TimesNewRoman, "Times New Roman", Times, Serif;font-size:11pt;'> <font style="font-family: TimesNewRoman, "Times New Roman", Times, serif; font-size: 14px; color: #000000;"> <p>Blah blah. </p> </font> </body></html> 
+4
source share
2 answers

Times is not a Windows font (I believe this is the Mac name for Times New Roman).

Provided by cssfontstack , try something like this:

font-family: TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif;

In addition, try using quotation marks in the previous example to find out if this matters. Also, apply css styles to the <font> or <td> directly. Div is not recommended for html email messages, so I would avoid them where possible. I use font tags almost exclusively for stylish text, and they always seem accessible to me.

+2
source

I had a similar problem, but I only have Office 2010, so I can’t verify that this will work in 2007. In case this helps, I shared the basic structure of my HTML messages for Outlook below. The key differences that I see from the original question are the "text / css" style type and the attached comment tags around the styles. Note that other elements, such as td, th, table, etc., can also be written in this block.

 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>My Title</title> <style type="text/css"> <!-- body { font-size: 10pt font-family: sans-serif; } --> </style> </head> <body> blah, blah </body> </html> 
+2
source

Source: https://habr.com/ru/post/1482000/


All Articles