【发布时间】:2014-06-25 16:49:03
【问题描述】:
我在获取响应式电子邮件模板以在 Outlook(桌面)中正确呈现时遇到了一些问题……惊喜。
我希望在移动设备上查看时右侧列位于左侧列下方(已实现)。然而,当在 Outlook 中查看时,它会将右侧列移动到一半,并在页面下方大约 50 像素。
这是给你的html和css;
@media only screen and (max-device-width: 480px) {
table[class="container"] {
width:300px !important;
}
td[class="header_body"] {
text-align:center !important;
padding-bottom:10px !important;
}
td[class="header_left_col"] {
text-align:center !important;
padding-bottom:10px !important;
}
}
<!-- START OF HEADER-->
<table cellpadding="0" cellspacing="0" border="0" width="600" align="center" class="container" bgcolor="#ffffff"><tr><td>
<table cellpadding="0" cellspacing="0" border="0" width="300" align="left" class="header_left_col"><tr><td>LOGO</td></tr></table>
<table cellpadding="0" cellspacing="0" border="0" width="300" class="header_right_col"><tr><td align="right">此处为正文</td></tr></table>
</td></tr></table>
提前致谢。
【问题讨论】:
-
简短的回答是:不要对电子邮件使用响应式技术,不幸的是大多数电子邮件客户端不支持它。
标签: html responsive-design outlook media-queries html-email