私はCSS/htmlに少し慣れていません。基本的に列を並べ替えることができるtablesorterを使用して、このjqueryプラグインを含めようとしています。テーブルのヘッダーをクリックして列を昇順/降順で並べ替えると、クラスタイプが変更されます。私はこのチュートリアルに従おうとしています:http ://weblogs.asp.net/hajan/archive/2011/02/09/table-sorting-amp-pagination-with-jquery-in-asp-net-mvc.aspx
ですから、私のコラムの1つでは、すべて同じであるため、並べ替えることができても意味がありません。私はasp.net/mvc3アプリケーションから始めており、「詳細」をクリックできる最後の列を参照しています。これは変わらないので、その列に上向き/下向きの矢印を入れたくありません。元のcssは次のようになります。
table.tablesorter {
font-family:arial;
background-color: #CDCDCD;
margin:10px 0pt 15px;
font-size: 11pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 10pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(themes/base/images/bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
color: #3D3D3D;
padding: 4px;
background-color: #FFF;
vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(themes/base/images/asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(themes/base/images/desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
だから私は追加できると思いました:
table.tablesorter thead .nostyle {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background-color: #8dbdd8;
}
そして、ヘッダーでスタイルが必要ない場合は、次のようにします。
<th class="#nostyle"></th>
しかし、それはうまくいきません。私はこれについて正しく行っていますか?それとももっと良い方法はありますか?ありがとう!