Quantcast
Channel: Elliott C. Back » Browsers
Viewing all articles
Browse latest Browse all 6

Outlook 2007 / 2010 HTML/CSS Foreground Background Colors on Span Elements

$
0
0

Say for example you wanted to have a span in an Outlook email (using Word’s terrible HTML renderer) with a unique foreground/background color:


<span style="color:#FF0000;background-color:#000000;">Your Text</span>

This would be supposed to render as: Your Text, but it actually renders as Your Text. Ironically enough, you can style a table cell with foreground/background colors and all will be well. To make this work in a span, I emailed myself an Outlook HTML mail composed using their in-client email editor, saved it to HTML, and found the style that works–adding a mso-highlight CSS rule with the background color:


<span style="color:#FF0000;mso-highlight:#000000;background-color:#000000;">Your Text</span>

For whatever reason, this works…

Update: This works in some cases (if you want a black bg, red text for example) but not others. If the colors are sufficiently OK outlook works fine. I haven’t figured this out 100% yet…


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images