Home  >  Q&A  >  body text

Targeting Outlook.com with CSS/Conditional Statements in 2022?

I'm having a serious problem sending emails, specifically the browser version of Outlook (webmail).

All solutions that worked in the past no longer work in 2022:

[owa] .foo {
  background-color: red !important;
}
[class="x_foo"] {
  background-color: red !important;
}

I've also tried various conditional tags, but they don't work in the browser either:

<!--[if mso]>
    <style>
        .example-class {
            /* Outlook-specific CSS goes here. */
        }
    </style>
<![endif]-->

Are there known browser hacks for Outlook (Outlook.com) in 2022?

P粉155710425P粉155710425226 days ago422

reply all(1)I'll reply

  • P粉788571316

    P粉7885713162024-03-29 18:12:30

    Outlook.com webmail can be targeted like this:

    [class~="x_your-class-name"] {
      /* Replace this comment with your styles */
    }

    According to "How to Target Email" https://howtotarget.email/

    There are other issues specific to Outlook Webmail, so be sure to check this FAQ first: Outlook strips styles from

    reply
    0
  • Cancelreply