简单html签名中图像右侧的1px垂直间隙

问题描述 投票:1回答:3

我已经尝试过我能找到的一切。图像右侧着名的1px垂直间隙似乎仍无法解决问题!请有人帮忙解决这个问题。我一个接一个地拉出来之后就没有留下任何头发!

请有人帮忙吗?

<style type="text/css">
    /* /\/\/\/\/\/\/\/\/ RESET STYLES /\/\/\/\/\/\/\/\/ */
    body{
        margin:0;
        padding:0;
    }

    img{
        border:0 none;
        height:auto;
        line-height:100%;
        outline:none;
        text-decoration:none;
    }

    a img{
        border:0 none;
    }

    .imageFix{
        display:block;
    }

    table, tr, td{
        border-collapse:collapse;
    }

    #bodyTable{
        height:100% !important;
        margin:0;
        padding:0;
        width:799px !important;
        max-width: 799px !important;
    }
</style>
<table bgcolor="red" width="799" cellspacing="0" cellpadding="0">
<tbody>
    <tr>
        <td width="176" height="115">
            <img src="https://www.htref.co.za/signatures/images/img01-01.png" class="imageFix" alt="logo" width="176" height="115">
        </td>
        <td width="623" height="115">
            <img src="https://www.htref.co.za/signatures/images/img01.png" class="imageFix" alt="logo" width="623" height="115">
        </td>
    </tr>
</tbody>
</table>

示例显示图像右侧的1px垂直间隙

html css email space signature
3个回答
0
投票
bgcolor="red"

有必要吗?没有这个,差距就消失了。


0
投票

在我的电脑上,没有边框出现!

将浅灰色背景颜色放在身体上,任何位于图像右侧的颜色。

例如,为什么在使用Flexbox时可以使用表格?


0
投票

您是否尝试过在图像之前或之后放置任何空白区域?我记得你的源代码HTML中的空格是折叠的,但仍然在输出中呈现为空格字符。因此,在img标记之前或之后没有空格,制表符或换行符。

但如果这是你签名的全部内容,你就不需要table(这是90年代对齐图片的方式)。您可以直接使用imgs(但在标签之前或之后仍然没有空格):

<!DOCTYPE html>
<html>
<head>
  <style type="text/css">
    body{
        width: 799px
    }
  </style>
</head>
<body><img src="https://www.htref.co.za/signatures/images/img01-01.png" 
         alt="logo" width="176" height="115" 
     /><img src="https://www.htref.co.za/signatures/images/img01.png" 
         alt="logo" width="623" height="115" 
    /></body>
</html>
© www.soinside.com 2019 - 2024. All rights reserved.