在100%宽度表中链接导致宽度为90%的表格 [英] Link in 100% width table results in 90% width table

查看:177
本文介绍了在100%宽度表中链接导致宽度为90%的表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是非常重要的。

下面的代码应该产生一个100%宽的电子邮件,一个石灰色的顶部。但是由于TD包含了一个链接,整个表格现在是90%左右,但只能在iPhone电子邮件中使用。删除链接,电子邮件是正确的...发生了什么?

This below code should result in a 100% width e-mail, with a lime colored top. But because the TD contains a link, the whole table is now 90% (or so) - but only in iPhone e-mail. Remove the link and the email is correct... What's going on?

https://s3.amazonaws.com/resultcaptures/C1C356D4-EAC0-4A50-B278-04155E256E51.png

我已将我的电子邮件归结为:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Email</title>    
</head>
<body bgcolor="brown" style="margin:0;padding:0; ">
    <table cellpadding="0" cellspacing="0" width="100%" bgcolor="black">
        <tr>
            <td bgcolor="Lime">
                <div><a href="#" alt="">This</a> is a link</div>
            </td>
        </tr>
    </table>
</body>
</html>

没有什么是错的...对吧? ...或者我是盲人的?

Nothing is wrong with it... right? ...or am I blind?

推荐答案

这个MacRumors线程提供了一个解决方案: http://forums.macrumors.com/showthread.php?t=1158457

This MacRumors thread provides a solution to the issue: http://forums.macrumors.com/showthread.php?t=1158457


尝试将align =center和style =text-align:center放在第一个表上,然后将style =text-align:left如果需要,第二个。

Try to put align="center" and style="text-align:center" onto the first table and then put style="text-align:left" onto the second one if necessary.

如果您将内容封装在具有中心对齐方式的父表中,这似乎奇迹似乎消除了正确的边距在iPhone邮件阅读器上。

If you wrap your content in a parent table with center alignment, this oddly seems to eliminate the right margin on the iPhone mail reader.

这篇关于在100%宽度表中链接导致宽度为90%的表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆