1

<html xmlns:v="urn:schemas-microsoft-com:vml">

<body>
    <table width="600" border="1" cellpadding="5">
        <tbody>
            <tr>
                <td colspan="1">qnty</td>
                <td colspan="2">price</td>
            </tr>
            <tr>
                <td colspan="1">100</td>
                <td colspan="1">
                    <!--[if mso]>
                        <span style="position: relative;color: black;">
                            $7.75
                            <v:rect stroke="f" fill="t" fillcolor="red" style="width: 40px; height: 1px; position: absolute; left: 0px;top: 8px"></v:rect>
                        </span>
                    <![endif]-->
                    <!--[if !mso]>
                        <span style="position: relative;color: black;">
                            $1232
                            <v:rect stroke="f" fill="t" fillcolor="red" style="width: 40px; height: 1px; position: absolute; left: 0px;top: 8px"></v:rect>
                        </span>
                    <![endif]-->

                </td>
                <td colspan="1">0.25</td>
            </tr>
        </tbody>
    </table>

</body>

</html>

I Am using the above HTML to show price 7.75 in outlook and 1232 in other emails like GMAL. The code works fine for outlook but it shows the same result for Gmail.

Gmail Gmail updated screen shot

Outlook outlook screenshot

Syfer
  • 4,262
  • 3
  • 20
  • 37
zoyeb-khan
  • 21
  • 2
  • Does this answer your question? [HTML Emails: fallback for mso conditional?](https://stackoverflow.com/questions/18254711/html-emails-fallback-for-mso-conditional) – Ken Y-N Oct 07 '20 at 07:11
  • from you screens shot it seems you are looking at both the emails in Outlook? For the codes to work, you will need to check in Outlook (desktop) and Gmail (web browser). – Syfer Oct 07 '20 at 23:08
  • @Syfer i have updated the image. It was uploaded wrong by me. – zoyeb-khan Oct 09 '20 at 05:52
  • @KenY-N not exactly as gmail is showing same price as that of outlook can check updated image – zoyeb-khan Oct 09 '20 at 05:54

1 Answers1

2

It looks like your !mso conditional comment is incorrect. The correct formatting to hide content from Outlook and have it visible elsewhere is:

<!--[if !mso]><!-->
<span style="position: relative;color: black;">
    $1232
    <v:rect stroke="f" fill="t" fillcolor="red" style="width: 40px; height: 1px; position: absolute; left: 0px;top: 8px"></v:rect>
</span>
<!--<![endif]-->
HTeuMeuLeu
  • 1,851
  • 1
  • 7
  • 17