css - IE 6.0 需要一个非常细的边框

标签 css internet-explorer-6 border

我正在尝试为我的表格(从 GridView 呈现的表格)获得一个非常细的边框。我已经为 GridView 设置了 BorderWidth="0",然后通过 CSS 为我需要的行创建了边框。在这里,我不希望网格标题周围有任何边框。网格呈现到表格和 TR 的 HTML 代码。所以我有以下 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>

        &nbsp;&nbsp;<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>

最佳答案

使用“1px”而不是“thin”。

关于css - IE 6.0 需要一个非常细的边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3998565/

相关文章:

css - 奇怪的 IE6 相关 float 布局错误

html - HTML GIF 上方的未知行

css - 带有 css 的凸边框顶部和边框底部?

javascript - 轮播(图像 slider )与响应式菜单冲突

html - IE6 错误 - anchor 标记内的 Div : inline images not links

只适用于 Chrome 的 CSS?

css - IE6 中的透明 PNG (AlphaImageLoader)

html - HTML 伪列周围的边框

javascript - Base64 图像转换 - 为什么?

html - 为什么我的上表不遵守 css 宽度规则?