display:none doesn't work on Outlook 2007

Use mso-hide:all in a span surrounding the content, and on any other tags within the span.


The only working solution I've found is to use conditional formatting in the HTML source :

<!--[if !mso 9]><!-->
<div>This block of code will display <b>everywhere</b> except in Outlook 2007.</div>
<!--<![endif]-->

Outlook 2007 uses the Microsoft Word engine for rendering HTML which has very limited support for CSS. This page describes the kind of things you can expect to work (display is one of the "not supported" ones).

Unfortunately, there's not much you can do. You can enclose the element in HTML comments <!-- ... --> which would stop it from rendering, but that's about it.

Tags:

Css

Outlook