如何使表的第一列不可见?

时间:2009-11-27 04:34:07

标签: html css xhtml

下面是我的表格显示的CSS代码。如何修改此代码以使第一列不可见?

table.tbl { width:100%; border: 2px solid #c3daf9; font-size: 0.9em; clear: both; }
td.tbl-header { background: url(/images/head_bg.gif); text-align: center; padding: 3px; font-weight: bold; border-bottom: 2px solid #c3daf9; }
tr.tbl-footer {}
table.tbl-footer { font-size: 1em;}
tr.tbl-row {height: 40px}
tr.tbl-row:hover { background: #EBFFFF; } /* Old color: #E9E9E9 */
tr.tbl-row-even { background: #F5F9FF; }
tr.tbl-row-odd { background: #FFFFFF; }
tr.tbl-row-highlight:hover { background: lightblue; cursor: pointer; }
td.tbl-nav { background: url(/images/head_bg.gif); height: 20px; border-top: 2px solid #c3daf9; color: #4D4D4D; }
td.tbl-pages { text-align: center; }
td.tbl-row-num { text-align: right; }
td.tbl-cell {}
td.tbl-controls { text-align: center; }
td.tbl-found {}
td.tbl-checkall {}
td.tbl-page { text-align: right; }
td.tbl-noresults { font-weight: bold; color: #9F0000; height: 45px; text-align: center; }
span.tbl-reset { margin: 5px 5px; }
img.tbl-reset-image { margin-right: 5px; border: 0; }
span.tbl-create { margin: 5px 0; }
img.tbl-create-image { margin-right: 5px; border: 0; }
div.tbl-filter-box {}
img.tbl-arrows { border: 0; }
img.tbl-order-image { margin: 0 2px; border: 0; }
img.tbl-filter-image { border: 0; }
img.tbl-control-image { border: 0; }
span.page-selected { color: black; font-weight: bold; }
input.tbl-checkbox {}

1 个答案:

答案 0 :(得分:3)

如果您不关心IE6支持,可以

table tr td:first-child {
    display: none;
}

虽然我不确定这是否会隐藏第一个,或每行的第一个。