看起來像在FF它是第一個表格行後覆蓋它。
您可以通過使表的第一行不具有背景顏色並在其頂部添加邊距來修復。現在看看。
高度真的應該是70px,因爲那是背景圖片的高度。填充在FF中沒有效果。在FF中,選項卡看起來不錯,然後在其他版本中,只需確保背景爲白色即可。
將頁面中的css改爲此padding-bottom,並且由於所有其他樣式,padding-top在FF中不起作用。
#slim {
width: 580px;
margin: 0 auto;
}
/* tables */
table.interactiveData {
font-family: "Lucida Grande", "Tahoma", "Franklin Gothic Medium", "Arial", Sans-serif;
background-color: ;
margin:10px 0pt 15px;
font-size: 10px;
width: 100%;
text-align: left;
border: 1px solid #dbdbdd;
}
table.interactiveData thead tr {
cursor: pointer;
background: url(http://mikepuerto.com/iNews/images/thead-bg.jpg);
}
table.interactiveData thead tr .headerSortDown, table.interactiveData thead tr .headerSortUp {
background: #fff url(http://mikepuerto.com/iNews/images/thead-hover-bg.jpg) center center no-repeat;
}
table.interactiveData tbody td {
padding: 7px;
vertical-align: middle;
}
table.interactiveData td.even {
}
table.interactiveData tr.odd {
background-color: #f3f3f3;
}
table.interactiveData td.sortedeven {
background-color:#edf8fa;
}
table.interactiveData td.sortedodd {
background-color:#edf1f2;
}
table.interactiveData thead tr th {
color: #fff;
font-size: 10px;
font-weight: bold;
height: 70px;
padding-left: 5px;
padding-right: 5px;
}
具體以#fff作爲覆蓋紅色的背景顏色。
table.interactiveData thead tr .headerSortDown, table.interactiveData thead tr .headerSortUp {
background: #fff url(http://mikepuerto.com/iNews/images/thead-hover-bg.jpg) center center no-repeat;
}
然後將其設置爲70px高度,只設置左右邊距。如果你想填充頂部和底部,你將不得不把它們包在一個跨度或去另一條路線。
table.interactiveData thead tr th {
color: #fff;
font-size: 10px;
font-weight: bold;
height: 70px;
padding-left: 5px;
padding-right: 5px;
}
現在可用於FF,Chrome,IE和Safari。
全部標記
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
表 $(文件)。就緒( 函數(){ $( 「#interactiveData」)的tablesorter({小部件:['斑馬','columnHighlight']}); }
);
</script>
<link rel="stylesheet" href="styles.css" />
<style>
#slim {
width: 580px;
margin: 0 auto;
}
/* tables */
table.interactiveData {
font-family: "Lucida Grande", "Tahoma", "Franklin Gothic Medium", "Arial", Sans-serif;
background-color: ;
margin:10px 0pt 15px;
font-size: 10px;
width: 100%;
text-align: left;
border: 1px solid #dbdbdd;
}
table.interactiveData thead tr {
cursor: pointer;
background: url(http://mikepuerto.com/iNews/images/thead-bg.jpg);
}
table.interactiveData thead tr .headerSortDown, table.interactiveData thead tr .headerSortUp {
background: #fff url(http://mikepuerto.com/iNews/images/thead-hover-bg.jpg) center center no-repeat;
}
table.interactiveData tbody td {
padding: 7px;
vertical-align: middle;
}
table.interactiveData td.even {
}
table.interactiveData tr.odd {
background-color: #f3f3f3;
}
table.interactiveData td.sortedeven {
background-color:#edf8fa;
}
table.interactiveData td.sortedodd {
background-color:#edf1f2;
}
table.interactiveData thead tr th {
color: #fff;
font-size: 10px;
font-weight: bold;
height: 70px;
padding-left: 5px;
padding-right: 5px;
}
</style>
</head>
<body>
<div id="slim">
<table id="interactiveData" class="interactiveData" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>Rank</th>
<th>Broker-Dealer</th>
<th>Website</th>
<th>Discretionary Assets</th>
<th>Discretionary Assets 2007</th>
<th>Difference in Discretionary Assets 2007-2009</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>data2b
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
</td>
<td>1</td>
<td>data4d</td>
<td>data5e</td>
<td>data5e</td>
</tr>
<tr>
<td>2</td>
<td>
data1f
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
</td>
<td>data2g</td>
<td>data3h</td>
<td>data4i</td>
<td>data4i</td>
</tr>
<tr>
<td>3</td>
<td>data2l
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
</td>
<td>data3m</td>
<td>data4n</td>
<td>data5o</td>
<td>data5o</td>
</tr>
<tr>
<td>4</td>
<td>data2q
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
</td>
<td>data3r</td>
<td>data4s</td>
<td>data5t</td>
<td>data5t</td>
</tr>
<tr>
<td>5</td>
<td>data2q
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
</td>
<td>data3r</td>
<td>data4s</td>
<td>data5t</td>
<td>data5t</td>
</tr>
<tr>
<td>6</td>
<td>data2q
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
</td>
<td>data3r</td>
<td>data4s</td>
<td>data5t</td>
<td>data5t</td>
</tr>
</tbody>
</table>
</div>
</body>
影子也沒有在最新的Opera,僅供參考 – 2009-12-16 04:12:15