I need some particular css for an html email, but only in outlook.
I'm looking for the outlook equivalent of<!--[if IE]>body {background-color:red} <![endif]-->
Outlook doesn't support these CSS properties, so we use MSO tags to create “ghost tables” that apply a fixed width just for Outlook. Outlook can't render the CSS in this DIV but other email clients can, so we wrap this in a ghost table that replicates the DIV's desktop style. In this case, a container 340px wide.
While you can use CSS background images with Outlook.com and Outlook 365, they are not supported in most desktop versions of the client.
On the View tab, in the Current View group, select View Settings. In the Advanced View Settings dialog box, select Conditional Formatting.
Using Cascading Style Sheets (CSS) allows developers to separate content from presentation. In other words, with CSS the visual layout of a Web page can be established with style sheets, while the content can be put into HTML.
<!--[if gte mso 9]
// This CSS will only be seen in Outlook 2007
![endif]-->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With