我正在制作一个内嵌HTML的电子通讯。到目前为止,一切都很顺利,除了一个图像不会在其表格单元格中重复。我在整个时事通讯的其余部分都有“重复 - y”图像,但是这个单元格没有表现。有什么建议吗?
以下是代码:jsFiddle
<table style="width:780px;">
<tr>
<td style="width: 55px; background: #fffff url(http://25.media.tumblr.com/40e5aa33eb561f0148b1711a92d65043/tumblr_mpk3j3FRaa1snsew1o6_r1_100.jpg) left repeat-y;" valign="top">
<img src="http://25.media.tumblr.com/40e5aa33eb561f0148b1711a92d65043/tumblr_mpk3j3FRaa1snsew1o6_r1_100.jpg" width="55" />
</td>
<td style="background: #ffffff;" valign="top">
<p style="text-align: right;">
<span style="font-size:11px;"><span style="color: rgb(126, 146, 175);"><span style="font-family: 'trebuchet ms', helvetica, sans-serif;">texttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br />
</td>
</tr>
</table>
*编辑:最终的时事通讯将通过iContact.com发送,如果这有任何区别。
答案 0 :(得分:0)
你的css应该将背景声明分开。
注意,我在这里使用background
,background-image
和background-repeat
声明:
<td style="width: 55px; background: #fffff; background-image:url(http://25.media.tumblr.com/40e5aa33eb561f0148b1711a92d65043/tumblr_mpk3j3FRaa1snsew1o6_r1_100.jpg); background-repeat:repeat-y" valign="top">
您也可以从图像/重复声明中分离出背景颜色声明,并使用相同的背景标记:
<td style="width: 55px; background: #fffff; background: url(http://25.media.tumblr.com/40e5aa33eb561f0148b1711a92d65043/tumblr_mpk3j3FRaa1snsew1o6_r1_100.jpg) repeat-y;" valign="top">
更正重复后,您应该可以删除另一个调用以显示图像:
<table style="width:780px;">
<tr>
<td style="width: 55px; background: #fffff; background-image:url(http://25.media.tumblr.com/40e5aa33eb561f0148b1711a92d65043/tumblr_mpk3j3FRaa1snsew1o6_r1_100.jpg); background-repeat:repeat-y" valign="top">
</td>
<td style="background: #ffffff;" valign="top">
<p style="text-align: right;">
<span style="font-size:11px;"><span style="color: rgb(126, 146, 175);"><span style="font-family: 'trebuchet ms', helvetica, sans-serif;">texttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br /> texttexttexttexttexttexttext<br />
</span></span></span>
</p>
</td>
</tr>
</table>
以下是更新后的fiddle。
编辑:请注意,您应该closing开始创建有效HTML的代码。