Targeting Outlook.com with CSS/Conditional Statements in 2022?
P粉155710425
P粉155710425 2024-03-28 22:52:27
0
1
411

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粉155710425
P粉155710425

reply all(1)
P粉788571316

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!