ずいぶん前に作成したテーブルについて質問があります。
並べ替え可能な列の背景が青色のテーブルがありました。このテーブルに別のクラスを追加したいのですが、「sortable-table-white-bg」と言うと、テーブルに追加すると青い背景が削除され、白い背景が並べ替え可能な列に追加されます。
私のテーブルコードは以下のとおりです:
<table cellspacing="0" cellpadding="0" border="0" class="data-table sortable-table "
summary="JavaScript enabled sortable data table example">
<caption><em>Sortable data table</em></caption>
<thead>
<tr>
<th scope="col">Header 1</th>
<th scope="col" class="abc-sort">
<a href="#sort">
<span>Header 2</span>
<span class="abc-icon"> </span>
</a>
</th>
<th scope="col" class="abc-numeric abc-sort">
<a href="#sort">
<span>Header 3</span>
<span class="abc-icon"> </span>
</a>
</th>
<th scope="col" class="abc-date abc-sort">
<a href="#sort">
<span>Header 4</span>
<span class="abc-icon"> </span>
</a>
</th>
<th scope="col">Header 5</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" class="abc-table-row">This is a sample text</th>
<td>Duis autem</td>
<td class="abc-numeric">$1,234.56</td>
<td>12 Dec 1999</td>
<td>Ipsum dolor</td>
</tr>
<tr>
<th scope="row" class="abc-table-row">This is a sample text</th>
<td>Quis nostrud</td>
<td class="abc-numeric">$789.10</td>
<td>25 Jul 2007</td>
<td>Adipscing</td>
</tr>
<tr>
<th scope="row" class="abc-table-row">This is a sample text</th>
<td>Magna diam</td>
<td class="abc-numeric">$1,112.13</td>
<td>01 Jan 2000</td>
<td>Sed diam</td>
</tr>
</tbody>
</table>
テーブルの CSS は次のとおりです。
table.data-table.sortable-table td.accent{
background-color: #eeeeee;
}
table.data-table td.abc-sort-column{
background:url(/i/v17/table_sort_col_background.gif) repeat-x 0px 0px ;
}
table.data-table tbody tr:first-child td.abc-sort-column{
background: url(/i/v17/table_sort_col_background_child.gif) repeat 0 0 !important;
}
クラス「sortable-table-white-bg」をテーブルに追加するときに、CSSを次のように変更しました
table.data-table.sortable-table td.accent{
background-color: #eeeeee;
}
table.sortable-table-white-bg td.abc-sort-column{
background-color: #ffffff;
}
table.data-table td.abc-sort-column{
background:url(/i/v17/table_sort_col_background.gif) repeat-x 0px 0px ;
}
table.sortable-table-white-bg tbody tr:first-child td.abc-sort-column{
background-color: #ffffff ;
}
table.data-table tbody tr:first-child td.abc-sort-column{
background: url(/i/v17/table_sort_col_background_child.gif) repeat 0 0 !important;
}
何も変わっていません...同じ青い背景が表示されます。
この問題で私を助けてください。
前もって感謝します