HTML电子邮件:如果图像溢出td

时间:2016-08-29 05:55:12

标签: html css html-table



<tr>
    <td style="padding-bottom: 20px;">
        <table cellspacing="8" style="margin: 0 auto; ">
          <tr>

            <td>
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1456734546.jpg" width="70" height="50">
            </td>

            <td style="padding-left: 30px;">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303796.jpg" width="70" height="50">
            </td>

            <td style="padding-left: 30px;">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303882.jpg" width="70" height="50">
            </td>

            <td style="padding-left: 30px;">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303957.jpg" width="70" height="70">
            </td>
          </tr>
        </table>
    </td>
</tr>
&#13;
&#13;
&#13;

如果我添加新图片,那么它应该在td中心的新行中。

PS:我无法使用div等其他标签,必须坚持使用table代码和仅内联css

谢谢。

2 个答案:

答案 0 :(得分:0)

使用<img style="display:block;margin-bottom:5px" ....>

<table>
<tr>
                            <td style="padding-bottom: 20px;">
                                <table cellspacing="8" style="margin: 0 auto; ">
                                  <tr>

                                    <td>
                                        <img style="display:block;margin-bottom:5px" src="https://www.gravatar.com/avatar/363f6fc1eef91cd384f97bfe212c8a21?s=32&d=identicon&r=PG&f=1" width="70" height="50"><img src="https://www.gravatar.com/avatar/363f6fc1eef91cd384f97bfe212c8a21?s=32&d=identicon&r=PG&f=1" width="70" height="50">
                                    </td>

                                    <td style="padding-left: 30px;">
                                        <img src="https://www.gravatar.com/avatar/363f6fc1eef91cd384f97bfe212c8a21?s=32&d=identicon&r=PG&f=1" width="70" height="50">
                                    </td>

                                    <td style="padding-left: 30px;">
                                      <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303882.jpg" width="70" height="50">
                                    </td>

                                    <td style="padding-left: 30px;">
                                        <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303957.jpg" width="70" height="70">
                                    </td>
                                  </tr>
                                </table>
                            </td>
                        </tr>
</table>

答案 1 :(得分:0)

&#13;
&#13;
<tr>
    <td style="padding-bottom: 20px;">
        <table cellspacing="8" style="margin: 0 auto; ">
          <tr>

            <td style="padding-left: 30px;">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1456734546.jpg" width="70" height="50">
            </td>
            <td style="padding-left: 30px;">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303796.jpg" width="70" height="50">
            </td>

            <td style="padding-left: 30px; ">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303882.jpg" width="70" height="50">
            </td>

            <td style="padding-left: 30px; ">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303957.jpg" width="70" height="70">
            </td>
            </tr>
          
            <td style="padding-left:45%;">
                <img src="http://www.hubilo.com/eventApp/ws/images/sponsor/logo/thumb/2712_1455303957.jpg" width="70" height="70">
            </td>
          
        </table>
    </td>
</tr>
&#13;
&#13;
&#13;