我有一个2列的表。 1用于文本,另一用于图像。 我有重复的边框样式,如边框左边,边框右边等。TD之间的边界和间距。需要帮助
有没有像边框的方法:0 0 1 0; ?这样我就不会重复在下面的单元格上应用的整个样式。任何更好的方法。
我在TD之间有很小的间距。我不想要它。任何人都可以告诉我如何去除间距。
任何人都有更好的造型技巧,以达到同样的事情更清洁。
http://jsfiddle.net/pauldwaite/kYAMX/
CSS
.ver-mainbox-table{width:898px; }
.ver-mainbox-tr{height:122px; background-color:#ffffff; }
.ver-mainbox-txt{vertical-align:middle; padding:0 0 0 10px; width:500px; border-top:1px solid #c3c3c3; border-left:1px solid #c3c3c3; border-bottom:1px solid #c3c3c3; }
.ver-mainbox-img{vertical-align:middle; padding:2px 2px 2px 0; width:186px; text-align:right; border-top:1px solid #c3c3c3; border-right:1px solid #c3c3c3; border-bottom:1px solid #c3c3c3;}
.spacer-m{height: 15px;}
HTML
<table class="ver-mainbox-table">
<tr class="ver-mainbox-tr">
<td class="ver-mainbox-txt">
sdf sdf sdf sfd sdf
</td>
<td class="ver-mainbox-img">
<img src="v1.gif" alt="" title="" />
</td>
</tr>
<tr><td class="spacer-m" colspan="2"></td></tr>
<tr class="ver-mainbox-tr">
<td class="ver-mainbox-txt">
<h2>Immunizations</h2>
</td>
<td class="ver-mainbox-img">
<img src="v1.gif" alt="" title="" />
</td>
</tr>
</table>
你的答案是完美的。 – Pirzada