【发布时间】:2015-03-05 03:10:24
【问题描述】:
我有一封 HTML 电子邮件,其中包含相互浮动的“迷你表格”。
因此,我可以得到两张相对的迷你桌子;然后迷你桌子相互叠放。
它在 yahoo 电子邮件中完美运行,但在 Hotmail、Outlook 和 手机/平板电脑上崩溃。
以下是它在雅虎电子邮件中的外观示例:
但这就是它在 Outlook 和 Hotmail 中的外观:
我在下面附上了我的代码
我使用动态 PHP foreach 循环从数据库中生成数据。
foreach ($this->getMembers() as $user)
{
<td width='310' style='float:left'>
<TABLE width='300' border='0' colour='#FFFFFF' bgcolor='#FFFFFF' style='margin-left: 5px; border: 1px solid #999999; float: left; margin-top: 10px; margin-bottom: 10px'>
<TR>
<TH ROWSPAN=5 width='150' height='150'>
<a href='https://www.bab.com/profile'>
<img src='https://www.bab.com />
</a>
</TH>
<TD width='150' >
{$user->getFirstName()} (Aged: {$user->getActualAge()})
</TD>
</TR>
<TR height='30'>
<TD >
{$user->getCity()}
</TD>
</TR>
<TR >
<TD >
22 Miles Away
</TD>
</TR>
<TR >
<TD>
{$user->getNoYrsWorkExperience()} yrs exp
</TD>
</TR>
<TR >
<TD >
Salary: £ {$user->getSalaryAmount()}/hr
</TD>
</TR>
<TR>
<TH ROWSPAN=3 width='150' height='55'>
<table height='55'>
<tr height='38'>
<td>
<a href='https://www.baby.com/profile/{$user->getId()}'>
<img src='https://www.bab.com/htmlEmailsIcons/contactMe2.png' width='113' height='38' />
</a>
</td>
</tr>
<tr height='10'>
<td>
<a href='https://www.bab.com/profile/{$user->getId()}'>
View My Profile
</a>
</td>
</tr>
</table>
</TH>
</TR>
<TR>
<TD align='center'>
Available From:
</TD>
</TR>
<TR>
<TD>
{$this->availFrom()}- {$this->availTill()}
</TD>
</TR>
}
以上代码包含在格式正确的 HTML 电子邮件中。为简单起见,我没有附上它。
非常感谢一些关于为什么它在 hotmail 上中断的建议。
【问题讨论】:
标签: outlook html-email hotmail