As known Outlook client (Win version) doesn't use div's so I have to use tables. In order to make responsive design, I'm trying to use the hybrid design (as mentioned here https://www.litmus.com/blog/mobile-responsive-email-stacking/)
The problem is that the outlook client (outlook365 on win10) just ignores every syntax of conditional comments, and gives me the same results as if it was Gmail.
I couldn't find any answer. Could it be that Microsoft just removed this feature from their mail client? or am I doing something wrong.
I'll appreciate any idea. Thank you.
This is the HTML I've sent to myself and I got only the lines saying "this is not mso" (both conditions were ignored (the positive and the negative).
<!--[if mso]>
this is mso
<![endif]-->
<!--[if (gte mso 9)|(IE)]>
gte mso 9
<![endif]-->
<!--[if gte mso 16]>
this is mso 16
<![endif]-->
<!--[if (gte mso 9)|(IE)]>
gte mso 9
<![endif]-->
<!--[if !((gte mso 9)|(IE))]><!-- -->
This is not mso 9\ie
<!--<![endif]-->
<!--[if !mso]><!-- -->
This is not mso
<!--<![endif]-->
Related
I have a code with if condition:
<!--[if mso | IE]> ... <![endif]-->
I don't know the answer if I can use | as the divider for mso and internet explorer or if I should do two "if's"
Yes you can use | in the conditional statements.
Outlook Version MSO Comment Code
Codes to target specific email clients:
Outlook Version
MSO Comment Code
All versions of Outlook
<!–[if mso]> code <![endif]–>
Outlook 2000
<!–[if mso 9]> code <![endif]–>
Outlook 2002
<!–[if mso 10]> code <![endif]–>
Outlook 2003
<!–[if mso 11]> code <![endif]–>
Outlook 2007
<!–[if mso 12]> code <![endif]–>
Outlook 2010
<!–[if mso 14]> code <![endif]–>
Outlook 2013
<!–[if mso 15]> code <![endif]–>
Outlook 2016 and 2019
<!–[if mso 16]> code <![endif]–>
Code Definition
MSO Comment Code
gt Greater than
<!–[if gt mso 14]> Greater than MSO 2010 <![endif]–>
lt Less than
<!–[if lt mso 12]> Less than MSO 2007 <![endif]–>
gte Greater than or equal to
<!–[if gte mso 15]> Greater than or equal to MSO 2013 <![endif]–>
lte Less than or equal to
<!–[if lte mso 11]> Less than or equal to MSO 2003 <![endif]–>
| or
<!–[if mso 9 | mso 10]> If MSO 2000 or 2002 <![endif]–>
! not
<!–[if !mso 9]><!–> If not MSO <!–<![endif]–>
I have an outlook specific conditional statement that I can't seem to get to render in XSL. I've tried saving them as variables and printing them, putting them in tags... All with no luck.
Below is the code:
<!--[if gte mso 9]>
... code ...
<![endif]-->
Any ideas?
I have an outlook specific conditional statement that I can't seem to get to render in XSL.
What you are showing is an XML comment (<!-- comment -->) . Therefor you may try:
<xsl:comment>[if gte mso 9]>
... code ...
<![endif]</xsl:comment>
As an alternative you can use disable-output-escaping="yes" with <![CDATA[. Try:
<xsl:text disable-output-escaping="yes">
<![CDATA[ <!--[if gte mso 9]>
... code ...
<![endif]--> ]]>
</xsl:text>
I have a Bootstrap ASP.NET MVC 4 project and look perfect across all browsers, except for IE 8 on Windows Server 2003.
When viewing the website the text <!--[if lt IE 9 !IE]><![endif]--><!--[if lt IE 9 !IE]><!--<![endif]--><!--[if lt IE 9 !IE]><![endif]--> actually appears on the page, so the browser is ignoring it.
HTML
<!--[if lt IE 9 !IE]>
#Scripts.Render("~/bundles/jqueryold")
<![endif]-->
<!--[if gte IE 9 !IE]><!-->
#Scripts.Render("~/bundles/jquery")
<!--<![endif]-->
#Scripts.Render("~/bundles/bootstrap")
#Scripts.Render("~/bundles/freelance")
<!-- IE8 support for HTML5 elements and media queries -->
<!--[if lt IE 9 !IE]>
#Scripts.Render("~/bundles/ie9")
<![endif]-->
Any help resolving this issue would be much appreciated :-)
The problem is that !IE cancels out your conditional statement.
!IE means "target any other browser EXCEPT IE"
Just get rid of it
<!--[if lt IE 9]>
#Scripts.Render("~/bundles/jqueryold")
<![endif]-->
<!--[if gte IE 9]><!-->
#Scripts.Render("~/bundles/jquery")
<!--<![endif]-->
#Scripts.Render("~/bundles/bootstrap")
#Scripts.Render("~/bundles/freelance")
<!-- IE8 support for HTML5 elements and media queries -->
<!--[if lt IE 9]>
#Scripts.Render("~/bundles/ie9")
<![endif]-->
Check here for more info.
I want to use display A for IE great than 7 or other browsers, and display B for IE 7 and lower.
One way is
<!--[if !IE]>
A
<![endif]-->
<!--[if gte IE 8]>
A
<![endif]-->
<!--[if lt IE 8]>
B
<![endif]-->
But I don't want to write A twice in a page since A is very long and it seems unwise to duplicate it.
How can I achieve this by HTML only?
I need some particular css for an html email, but only in outlook.
I'm looking for the outlook equivalent of
<!--[if IE]>body {background-color:red} <![endif]-->
<!--[if gte mso 9]
// This CSS will only be seen in Outlook 2007
![endif]-->