为何在repeater表格线有的地方粗,有的地方细
在使用repeater时做成表格形式,结果行里的线粗细不均匀,我把其html代码贴出来,大家看看表格行里的线粗细不均匀啊?郁闷啊?
<table cellspacing="0" cellpadding="3" rules="all" style="background-color:White;border-color:#B3DBF0;border-width:1px;border-style:dotted;text-decoration:none; width:700px; border-collapse:collapse;">
<tr style="color:White;background-color:#006699;font-weight:bold;height:28px;"><td style="width:300px;">字段名称一</td><td style="width:200px;">字段名称二</td><td style="width:100px;">字段名称三</td><td style="width:100px;">字段名称四</td></tr>
</td>
</tr><tr>
<td>
<tr onmouseover="c=this.style.backgroundColor;this.style.backgroundColor='#DEF2FC'" onmouseout="this.style.backgroundColor=c" style="color:#000066;height:25px;"><td><a href="job_show.aspx?id=12" target="_blank">字段名称一</a></td><td>22jhjh</td><td>4500002</td><td>2008-7-1</td></tr>
</td>
</tr><tr>
<td>
<tr onmouseover="c=this.style.backgroundColor;this.style.backgroundColor='#DEF2FC'" onmouseout="this.style.backgroundColor=c" style="color:#000066;height:25px;"><td><a href="job_show.aspx?id=18" target="_blank">字段名称一</a></td><td>22jhjh</td><td>4500002</td><td>2008-7-1</td></tr>
</td>
</tr><tr>
<td>
<tr onmouseover="c=this.style.backgroundColor;this.style.backgroundColor='#DEF2FC'" onmouseout="this.style.backgroundColor=c" style="color:#000066;height:25px;"><td><a href="job_show.aspx?id=6" target="_blank">字段名称一</a></td><td>22jhjh</td><td>4500002</td><td>2008-7-1</td></tr>
</td>
</tr><tr>
<td>
<tr onmouseover="c=this.style.backgroundColor;this.style.backgroundColor='#DEF2FC'" onmouseout="this.style.backgroundColor=c" style="color:#000066;height:25px;"><td><a href="job_show.aspx?id=10" target="_blank">字段名称一</a></td><td>测试一下</td><td>510000</td><td>2008-6-19</td></tr>
</td>
</tr><tr>
<td>
</table>
------解决方案--------------------有些地方是两根线太近了,看作一根线了.
------解决方案--------------------粗是因为table默认的边框宽度的问题,你只定义了表格的边框,没有定义td的。
给表格增加一个 border="0" 属性 就漂亮多了
或者做成这样
HTML code
<style type="text/css">
<!--
.table {
border-top-width: 1px;
border-left-width: 1px;
border-top-style: dashed;
border-left-style: dashed;
border-top-color: #B3DBF0;
border-left-color: #B3DBF0;
}
.table th {
background-color: #006699;
font-size: 12px;
font-weight: bold;
line-height: 20px;
border-right-width: 1px;
border-right-style: dashed;
border-right-color: #B3DBF0;
}
.table td {
font-size: 12px;
line-height: 18px;
padding: 4px;
border-bottom-width: 1px;
border-bottom-style: dashed;
border-bottom-color: #B3DBF0;
border-right-width: 1px;
border-right-style: dashed;
border-right-color: #B3DBF0;
}
-->
</style>
<table border="0&quo