Html 为什么td宽度会被忽略而变成100%?

Html 为什么td宽度会被忽略而变成100%?,html,html-table,Html,Html Table,好吧,这让我非常愤怒。这段代码似乎没有什么问题,但出于某种原因,第一个td以表的可用宽度的100%呈现出来,剩下的td只是推动并扩展表的宽度。任何人如果你想看完整的东西,请点击这里。我快疯了 问题是因为您将页脚也放在同一个表中,并使用这样一个单独的表 <table> <!-- start email content--> </table> 分开表格 <table> <tr align="left" height="6

好吧,这让我非常愤怒。这段代码似乎没有什么问题,但出于某种原因,第一个td以表的可用宽度的100%呈现出来,剩下的td只是推动并扩展表的宽度。任何人如果你想看完整的东西,请点击这里。我快疯了




问题是因为您将页脚也放在同一个表中,并使用这样一个单独的表

<table>
<!-- start email content-->
</table>

分开表格

    <table>
    <tr align="left" height="65" bgcolor="#322e39">

    <!-- TEASERS -->
    <td width="137" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-tease-1.png" width="137" height="65">
    </td>

    <td width="125" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-tease-2.png" width="125" height="65">
    </td>

    <td width="128" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-tease-3.png" width="128" height="65">
    </td>

    <!-- SOCIAL MEDIA ICONS -->

    <td width="53" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-sm-fb.png" width="53" height="65">
    </td>

    <td width="60" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-sm-yt.png" width="60" height="65">
    </td>

    <!-- UNSUBSCR. AND MANAGE -->
    <td width="127" height="65">
    <a href="#" style="text-decoration:none;">
    <font face="Arial" size="1" color="#cfccd3">
    Manage My Account
    </font>
    </a>
    <br>
    <a href="#" style="text-decoration:none;">
    <font face="Arial" size="1" color="#cfccd3">
    Unsubscribe
    </font>
    </a>
    </td>

    </tr>
    </table>



因为您不应该使用表格进行布局。阅读一些关于CSS和布局的教程。你在fiddle中的代码看起来不错:[看看这个]这是一封电子邮件HTML。当微软最终消亡时,我们可能会看到桌子也会消亡的那一天,但那只是幻想。先生/女士,你是一个绝对的传奇。这在几何学等方面是完全不合逻辑的,但它是可行的。
    <table>
    <tr align="left" height="65" bgcolor="#322e39">

    <!-- TEASERS -->
    <td width="137" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-tease-1.png" width="137" height="65">
    </td>

    <td width="125" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-tease-2.png" width="125" height="65">
    </td>

    <td width="128" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-tease-3.png" width="128" height="65">
    </td>

    <!-- SOCIAL MEDIA ICONS -->

    <td width="53" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-sm-fb.png" width="53" height="65">
    </td>

    <td width="60" height="65" bgcolor="#322e39">
    <img src="http://www.webedgemarketing.info/dev/msa/images/em-ft-sm-yt.png" width="60" height="65">
    </td>

    <!-- UNSUBSCR. AND MANAGE -->
    <td width="127" height="65">
    <a href="#" style="text-decoration:none;">
    <font face="Arial" size="1" color="#cfccd3">
    Manage My Account
    </font>
    </a>
    <br>
    <a href="#" style="text-decoration:none;">
    <font face="Arial" size="1" color="#cfccd3">
    Unsubscribe
    </font>
    </a>
    </td>

    </tr>
    </table>