我正在为通过.NET发送的HTML电子邮件构建模板。我不经常这样做,我知道我必须坚持表格和内联CSS。我只是分割了一些图像,而我有两个需要堆叠。我知道HTML代码中的空白符合这个问题。结果,我已经在一行中尝试过了,例如HTML电子邮件模板中的堆叠图像之间有一个空格
<td valign="top" style="width: 314px;"><img src="/i/header_logo.jpg" width="314" height="92" alt="Logo" /><br /><img src="/i/woman.jpg" width="314" height="617" alt="Woman" /></td>
我在我的浏览器中预览过一些并且它们被一些空格分开。我也有CSS重置的全球行的像顶部:
<style type="text/css">
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;}
</style>
有谁知道如何在<td>
叠加两个图像,并让它们相互齐平?
更新:事实证明,我有一个doctype
顶部像一个正常的网页,并导致了这个问题。它与我的HTML/CSS组合无关。