我正在尝试为我的表(从GridView呈现的表)获得一个非常薄的边框。我为GridView设置了BorderWidth =“0”,然后通过CSS我创建了我需要的行的边框。在这里,我不希望网格标题周围有任何边框。网格的HTML代码呈现给表和TR。所以我有以下css:
tr.top td { border-top: thin solid black; border-left: thin solid black; border-right: thin solid black; }
tr.bottom td { border-bottom: thin solid black; }
这使得网格看起来像我需要的标题中没有边框。但是,其他行的边框宽度在IE6中太厚,但在FF中看起来很棒。有没有办法让IE中的边框变薄?
以下是正在使用的HTML代码:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title>
<style type="text/css">
tr.top td { border-top: thin solid black; border-left: thin solid black; border-right: thin solid black; }
tr.bottom td { border-bottom: thin solid black; }
</style
</head>
<body>
<form name="form1" method="post" action="default.aspx" id="form1">
<div>
<div>
<br />
<div>
<table cellspacing="0" rules="all" border="0" id="GridView1" style="border-width:0px;border-collapse:collapse;">
<tr>
<th align="left" colspan="5" style="font-weight:normal;"><a id="GridView1_ctl08_{0}_HeaderLink1" href="javascript: SelectAll(true)">Select All</a><span> | </span><a id="GridView1_ctl08_{0}_HeaderLink2" href="javascript: SelectAll(false)">Clear All</a></th>
</tr><tr class="top row">
<td><input id="GridView1_ctl02_CheckBoxButton" type="checkbox" name="GridView1$ctl02$CheckBoxButton" /></td><td>10-000000-001</td><td>The Iliad and The Odyssey</td><td>12.95</td><td>Mike Loyid</td>
</tr><tr class="top row">
<td><input id="GridView1_ctl03_CheckBoxButton" type="checkbox" name="GridView1$ctl03$CheckBoxButton" /></td><td>10-000000-999</td><td>Anthology of World Literature</td><td>24.95</td><td>Jessica Freclih</td>
</tr><tr class="top row">
<td><input id="GridView1_ctl04_CheckBoxButton" type="checkbox" name="GridView1$ctl04$CheckBoxButton" /></td><td>11-000000-002</td><td>Computer Dictionary</td><td>24.95</td><td>Roger Butt</td>
</tr><tr class="top row">
<td><input id="GridView1_ctl05_CheckBoxButton" type="checkbox" name="GridView1$ctl05$CheckBoxButton" /></td><td>11-000000-003</td><td>Cooking on a Budget</td><td>23.95</td><td>Leena Reebeca</td>
</tr><tr class="top bottom row">
<td><input id="GridView1_ctl06_CheckBoxButton" type="checkbox" name="GridView1$ctl06$CheckBoxButton" /></td><td>11-000000-004</td><td>Great Works of Art</td><td>29.95</td><td>Luke Killey</td>
</tr>
</table>
</div>
<input type="submit" name="Button1" value="Button" id="Button1" /></div>
<span id="Results"></span>
</form>
</body>
</html>
答案 0 :(得分:3)
使用“1px”代替“瘦”。