从表中删除边框

时间:2013-01-22 16:49:26

标签: css html5 css3

如何仅从表格的第一个左栏中删除表格标题行中的顶部蓝色边框以及左侧蓝色边框?

的CSS:

<style type="text/css">
    table {
        width: 800px;
        color: #235A81;
        font-family: Arial;
        font-size: 9pt;
        border: 0px;
    }
    th, td {
        border: solid blue;
        border-width: 1px 0px 0px 1px;
        padding: 4px;
    }
    th {
        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff", endColorstr="#cdcdcd");
        width: 110px;
        height: 20px;
        border-bottom: 1px solid #808080;
    }
    tbody {
        height: 200px;
    }

        div {
            position: relative;
            height: 200px;
            width: 800px;
            overflow-y: scroll;
            overflow-x: scroll;
            border: 1px solid red;
        }

        thead tr {
            position: absolute;
            top: expression(this.offsetParent.scrollTop);
        }
        tbody {
            height: auto;
        }
        table tbody tr:first-child td {
            padding: 32px 4px 4px 4px;
        }
</style>

这是一个小提琴:http://jsfiddle.net/kvbS8/

1 个答案:

答案 0 :(得分:0)

尝试将th, td声明替换为:

th, td {
    border-bottom: 1px solid blue;
    border-right: 1px solid;
    padding: 4px;
}