0

I was using the following conditional statement to hide content in Outlook for responsive HTML emails,

<!--[if !gte mso 9]><!-- -->
<!--<![endif]-->

but, I am testing right now, and it does work fine for the Outlook app, but Outlook.com hides all content following this code. I was using it to hide the pre header at the beginning of the body content, but that resulted in a blank email. I am testing using my own outlook.com account and Litmus, which shows a blank email in all major browsers.

Anyone know of another technique to hide content for Outlook without breaking Outlook.com emails?

After more testing I found that this works in Outlook app and Outlook.com:

<!--[if !mso 9]><!-->
<!--<![endif]-->

I don't know if it was the "gte" part, but looks to work better with that removed.

Thanks for the responses.

Troy Thibodeaux
  • 70
  • 1
  • 11

1 Answers1

1

outlook.com eats anything in a comment, conditional or not.

Your best bet is to copy the section that hides in outlook '07 and paste it below the conditional comment end. Then give that pasted section's main container / table a class="outlookcomonly" and a style="display:none". In your style tag:

.ecxoutlookcomonly { display:block !important; }

Outlook.com preprocesses your classed items, adding 'ecx' before each of them. If you add that ecx to your style sheet outlook.com will see it, but all other clients will ignore it.

zazzyzeph
  • 1,727
  • 1
  • 12
  • 19