[英]How to use display none on outlook 2007, 2010, 2013 in html email
I am trying to get a some content to display none in desktop and show in the mobile version.我试图让一些内容在桌面上不显示并在移动版本中显示。 It works fine in most email clients but outlook 07,10,13 on windows devices are giving me a problem
它在大多数电子邮件客户端中运行良好,但 Windows 设备上的 Outlook 07,10,13 给我带来了问题
<tr class="mobileshow yahoohide hideit" align="center">
<th>
<table border="0" cellpadding="0" cellspacing="0" align="center" >
<tr>
<th>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="https://itunes.apple.com/us/app/meijer/id583093664?mt=8">
<img src="AppStore.png" width="100" height="auto" style=" text-decoration: none; border:0px;" class="stretch hideit"/>
</a>
</td>
</tr>
</table>
</th>
<th>
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<img src="space.gif" width="10" />
</tr>
</table>
</th>
<th>
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<a href="https://play.google.com/store/apps/details?id=com.meijer.mobile.meijer&hl=en">
<img src="googlePlay.png" width="100" height="auto" style=" text-decoration: none; border:0px;" class="stretch"/>
</a>
</td>
</tr>
</table>
</th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<th>
<table style="line-height:30px !important;" border="0" cellpadding="0" cellspacing="0" >
<tr>
<img src="space.gif" width="50" />
</tr>
</table>
</th>
</tr>
<tr>
<th>
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<img src="meijer.png" width="100" height="auto" style=" text-decoration: none; border:0px;" class="stretch"/>
</td>
</tr>
</table>
</th>
<th>
<table style="line-height:30px !important;" border="0" cellpadding="0" cellspacing="0" >
<tr>
<img src="space.gif" width="50" />
</tr>
</table>
</th>
<th>
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<img src="MPerksLogo.png" width="100" height="auto" style=" text-decoration: none; border:0px;" class="stretch"/>
</td>
</tr>
</table>
</th>
</tr>
</table>
</th>
</tr>
I have tried using我试过使用
<div class="mobilecontent" style="mso-hide:all;display:none;max-height:0px;overflow:hidden;">
MOBILE CONTENT
</div>
but this method did not work and i also tried applying the mso-hide:all and display none directly inline the style.但是这种方法不起作用,我也尝试应用 mso-hide:all 并直接内联样式显示 none。
Not sure what else I can do.不知道我还能做什么。
In order for you to hide everything in Outlook you need to have mso-hide:all
on every item I have seen for example if you have a table inside a div , it has to have mso-hide:all
on the table.为了让您在 Outlook 中隐藏所有内容,您需要在我看到的每个项目上都有
mso-hide:all
,例如,如果您在div 中有一个表格,则它必须在桌子上有mso-hide:all
。
<div class="mobilecontent" style="mso-hide:all;display:none;max-height:0px;overflow:hidden;">
<table style="display:none;mso-hide:all;">[row and data]</table></div>
Hope the above example helps希望上面的例子有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.