HTML:无法对齐图像和文本
我必须构建一个签名,我做了一些测试,在浏览器中看起来还不错。 但在 Windows Live Mail 和 Outlook 2010 中则不然,它们对 HTML 的解释似乎彼此不同。
以下是我的问题的一些示例:
GMail:
Outlook 2010:
Windows Live Mail:
如您所见,我无法对齐图像(在 Outlook 和 Windows Live Mail 中)右侧的文本按照 GMail 图像中的样子显示。
这是我的代码:
<hr>
<p style="color: gray;">
<tr>
<td>
<a href="#"> <img src="file:///C:/images/logo.jpg" align="left" border="0"> </a>
</td>
<td>
<b>Valter Henrique</b> <br>
skype: valter_brain_set</br>
email: <a href="#" style="text-decoration: none;color: #0056A2; ;">[email protected]</a></br>
fones: <b>11. 2094 6999<b> | 15. 9122 1822
</td>
</tr>
</p>
<p style="padding-left:15px;">
<font size=2 style="color: gray;">
<a href="#" style="text-decoration: none;color: gray;">
rua cel. irineu de castro, 188 - SP
</a>
<b>11. 2094 6999 </b>
<a href="#" style="text-decoration: none;color: gray">
brainset.com.br
</a>
</font>
</p>
似乎每个电子邮件阅读器对 HTML 的解释都非常不同。 有办法解决这个问题吗?
I have to build a signature, I made some test and it seems pretty okay in the browser.
But not in Windows Live Mail and Outlook 2010, it seems they interpretated HTML different from each other.
Here are some examples of my problem:
GMail:
Outlook 2010:
Windows Live Mail:
As you can see, I wasn't able to align the image (in Outlook and Windows Live Mail) with the text in the right to show as it should like in GMail image.
This is my code :
<hr>
<p style="color: gray;">
<tr>
<td>
<a href="#"> <img src="file:///C:/images/logo.jpg" align="left" border="0"> </a>
</td>
<td>
<b>Valter Henrique</b> <br>
skype: valter_brain_set</br>
email: <a href="#" style="text-decoration: none;color: #0056A2; ;">[email protected]</a></br>
fones: <b>11. 2094 6999<b> | 15. 9122 1822
</td>
</tr>
</p>
<p style="padding-left:15px;">
<font size=2 style="color: gray;">
<a href="#" style="text-decoration: none;color: gray;">
rua cel. irineu de castro, 188 - SP
</a>
<b>11. 2094 6999 </b>
<a href="#" style="text-decoration: none;color: gray">
brainset.com.br
</a>
</font>
</p>
It seems that each email reader interpret the HTML pretty different from each other.
There's some way to fix this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最后这是我的签名(谢谢大家的支持):
In the end this is my signature as I wish (thank you guys for the support):
要使文本对齐到顶部,请尝试在 td 中使用 valign=top:
要使文本看起来相同,请使用 CSS 中的 line-height 和 font 属性。
To make the text align to top, try valign=top in the td:
To make the text look the same, play around with the line-height and font properties in the CSS.