html - 作为电子邮件发送时如何删除表格行之间的空格?

标签 html css

<分区>

我有一个 HTML 标记,它作为电子邮件发送给订阅该站点的用户。用户输入他们的电子邮件 ID,然后单击按钮设计将作为电子邮件发送给用户。

View 文件的 HTML 标记是:

<table style="margin: auto;
    background: lightgray;width: 500px;border-spacing: unset;">
        <tbody>
            <tr>
                <td>

                <img src="https://cetra.in/Images/logo.png" /></td>
                <td align="center" colspan="2">  <h1 style="margin: auto;">Cetra Business Travel<h1></td>
</tr>
<tr>
    <td colspan="3" align="center"><img src="https://cetra.in/Images/subscribe.png" style="height: 300px;width: 500px;" /> </td>
</tr>
<tr style="background: #ffcf3d;" ><td colspan="3" style="width: 10px;padding-top: 45px;padding-bottom: 45px;">
<p style="text-align: center;
    font-size: 25px;padding: 0px 50px;">
                Thank you for subscribing. We are delighted to have you.Thank you for subscribing. We are delighted to
                have you Thank you for subscribing. We are delighted to have you
            </p>
</td></tr>
<tr style="background: white;">
    <td colspan="3" align="center" style="padding-bottom: 45px;padding-top: 45px"><button type="button" style="color: white;
    height: 53px;
    background: black;
    font-size: 30px;
    padding: 10px;
    border-radius: 60px;
    border: none;
    ">Read More</button></td>
</tr>
<tr style="background: white;">



<td align="center">
<span>

<a style="color:white" href="https://www.facebook.com/pg/cetrabusinesstravel/about/">    
<img src="https://cetra.in/Images/facebook_logo2.png" style="height:50px;width:50px"/></a></span>
</td>
<td align="center"><span>
<a style="color:white" href="https://twitter.com/cetrabiztravel?lang=en">    
<img src="https://cetra.in/Images/twitter_logo.png" style="height:50px;width:50px"/></a></span></td>
<td align="center"><span>
<a style="color:white" href="https://in.linkedin.com/company/cetrabusinesstravel">
    <img src="https://cetra.in/Images/linkedIn_logo.png" style="height:50px;width:50px"/>
</a></span></td>
        </tr>

        <tr style="background: white;">
            <td colspan="3" align="center">
                <p>Cetra Business Travel</p>
            </td>
        </tr>
        <tr style="background: white;">
            <td colspan="3" align="center"><p>
                            E 1202 Titanium City Center , Anand nagar road

                            prahladnagar

                            Ahmedabad, Gujarat 380015, IN
                        </p></td>
        </tr>

        <tr style="background: white;">
    <td align="center" colspan="3"> <a href="cetra.in">Cetra Hospitality</a>  
            <a href='cetra.in/user_unsubscribe/<?php echo $id ?> '> Unsubscribe</a></td>
</tr>

</tbody>
</table>

Controller 中的变量消息包含来自该 View 的 HTML 标记。 在本地主机中查看时效果很好,但当同一文件作为消息发送时,它显示图像和文本之间存在一些差距,这两个不同的 .

The Image of design when sent as an email

如何消除图像和文本之间的差距?

最佳答案

看起来像图像留下一些空间添加 display:block 到图像。

关于html - 作为电子邮件发送时如何删除表格行之间的空格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58162082/

相关文章:

javascript - 我想将其转换为 javascript 函数或通过 css 将图像转换为蓝色或黄色

jquery - 根据选择显示不同的 body 背景图像

html - 如何使用 Angular 创建 n 个可打印页面?

html - 边距设置对于设置链接元素水平居中无效

javascript - Php 函数订购图片

html - Bootstrap 容器、网格行宽和填充问题

python - 如何从网页python获取所有可复制文本

html - 如何并排放置 svg 和按钮并垂直对齐它们?

javascript - 如何在 iframe 中显示表单成功

jquery - 如何隐藏当前的 div 并在单击按钮时显示新的 div