{"id":758,"date":"2014-08-05T01:20:07","date_gmt":"2014-08-05T01:20:07","guid":{"rendered":"http:\/\/freshinbox.com\/blog\/?p=758"},"modified":"2017-08-14T21:56:04","modified_gmt":"2017-08-14T21:56:04","slug":"outlook-com-removes-all-content-within-conditional-comments","status":"publish","type":"post","link":"https:\/\/freshinbox.com\/blog\/outlook-com-removes-all-content-within-conditional-comments\/","title":{"rendered":"Outlook.com removes all content within conditional comments"},"content":{"rendered":"<p><B>Update Aug 2017:<\/B> This is no longer the case. Thank you Robby Morgan.<\/p>\n<p><em>Lets start with some terminology: Outlook refers to Outlook 2007\/2010\/2013, Microsoft\u2019s HTML challenged desktop email client (and a perennial pain in the a** for email designers) and Outlook.com refers to Microsoft\u2019s popular and HTML-responsible Web-based email client which began life as Hotmail.<\/em><\/p>\n<p>Outlook (since 2007) has always been terrible at rendering anything more than rudimentary HTML. However email designers have found clever ways to quarantine advanced email content from Outlook by hiding them using Outlook\u2019s proprietary conditional comments. This has the effect of hiding (or displaying) a piece of content ONLY for Outlook. For a long time this kept everyone a bit miffed but otherwise content.<\/p>\n<p>However I recently noticed that Outlook.com is stripping content within ALL conditional comments! Content that only used to be hidden only in Outlook is now also hidden in Outlook.com.<\/p>\n<p><strong>Effects of Outlook.com&#8217;s change<\/strong><\/p>\n<p>See the following conditional comments. In the past the conditional comments would clearly separate Outlook from the rest of the email clients. With Block A visible to clients such as iPhone, Android, Gmail, Yahoo! Mail, AOL and Outlook.com, and Block B, only visible to Outlook.<\/p>\n<pre class=\"lang:default decode:true \" >&lt;!--[if !mso 9]&gt;&lt;!--&gt;\r\nBlock A: Content hidden ONLY in Outlook 2007\/10\/13 (displayed in other clients)\r\n&lt;!--&lt;![endif]--&gt;\r\n\r\n&lt;!--[if gte mso 9]&gt;\r\nBlock B: Content displayed ONLY in Outlook 2007\/10\/13 (hidden in other clients)\r\n&lt;![endif]--&gt;<\/pre>\n<p>With the recent changes, Outlook.com strips BOTH Block A &#038; B, which may (or may not) have an unintended effect in your design: Content within Block A that is visible on non-Outlook clients will remain hidden in Outlook.com.<\/p>\n<p>Therefore with this discovery I no longer advocate using conditional comments for hiding content in Outlook alone. (I saw <a href=\"https:\/\/www.campaignmonitor.com\/forums\/topic\/7544\/outlookcom-problems-with-conditional-comments-in-the-body\/\" target=\"_blank\">this post that mentioned this issue<\/a> a year back but for some reason I was pretty sure all conditional comments were not removed until recently).<\/p>\n<p><strong>Use mso-hide:all CSS to hide content in Outlook.<\/strong><\/p>\n<p>So how do you hide content only in Outlook? Jeremy Peter posted a simpler solution in <a href=\"https:\/\/litmus.com\/community\/discussions\/67-hiding-content-from-desktop-version#comment-300\" target=\"_blank\">Litmus\u2019 discussion board<\/a> using the <code>mso-hide:all<\/code> CSS style.<\/p>\n<p><b>Caveat:<\/b> One requirement of this technique is that if the content contains nested tables, this style needs to be applied to each of the tables as well.<\/p>\n<pre class=\"lang:default decode:true \" >&lt;div style=\u201cmso-hide:all\u201d&gt;\r\n  Content hidden ONLY in Outlook\r\n&lt;\/div&gt;<\/pre>\n<p>See this updated article on how to <a href=\"https:\/\/freshinbox.com\/blog\/bulletproof-solution-to-hiding-mobile-content-when-opened-in-non-mobile-email-clients\/\" target=\"_blank\">hide mobile content in non-mobile email clients<\/a>.<\/p>\n<p><BR><BR><br \/>\n<div style=\"padding:10px; border: 2px solid #99C731;background-color:#FFF8DC;border-radius:5px;\">\n<form action=\"https:\/\/freshinbox1.createsend.com\/t\/i\/s\/adrmi\/\" method=\"post\" id=\"subForm\">\n<span class=\"fisub_header\" style=\"font-weight:bold;\">Subscribe to the #EmailGeeks Newsletter<\/span>\n<p><input id=\"fieldEmail\" name=\"cm-adrmi-adrmi\" type=\"email\" style=\"width:90%\" required placeholder=\"Your Email Address\" \/><\/p>\n<p><button type=\"submit\">Subscribe<\/button><\/p>\n<\/form>\n<\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>However I recently noticed that Outlook.com is stripping content within ALL conditional comments! Content that only used to be hidden only in Outlook is now also hidden in Outlook.com.<\/p>\n","protected":false},"author":2,"featured_media":292,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23,28],"tags":[],"_links":{"self":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/758"}],"collection":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/comments?post=758"}],"version-history":[{"count":24,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/758\/revisions"}],"predecessor-version":[{"id":782,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/758\/revisions\/782"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media\/292"}],"wp:attachment":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media?parent=758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/categories?post=758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/tags?post=758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}