2013-07-26 74 views
0

我試圖按照與我的選擇按鈕不同的方式調整分頁按鈕的樣式。我用於選擇按鈕的選擇器也適用於分頁按鈕:樣式頁按鈕與選擇按鈕不同

.gridView tr td a{} /* I've assigned the gridView class to the GridView */ 

如何僅選擇分頁按鈕?我嘗試這樣做:

.gridView tr td table tr td a{} //traced this down using Chrome's Inspect Element 

編輯:這裏的HTML(在ASP.NET寫這篇)

<div class="gridViewContainer"> 
    <div> 
<table class="gridView" cellspacing="0" rules="rows" border="1" id="GridViewName" style="border-collapse:collapse;"> 
    <tr> 
     <th scope="col">&nbsp;</th><th scope="col">FRAME</th><th scope="col">ELEV</th><th scope="col">CW</th><th scope="col">LEVEL</th> 
    </tr><tr> 
     <td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Select$0&#39;)">Select</a></td><td>MT</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> 
    </tr><tr> 
     <td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Select$1&#39;)">Select</a></td><td>QA</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> 
    </tr><tr> 
     <td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Select$2&#39;)">Select</a></td><td>QA</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> 
    </tr><tr> 
     <td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Select$3&#39;)">Select</a></td><td>VX</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> 
    </tr><tr> 
     <td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Select$4&#39;)">Select</a></td><td>PP</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> 
    </tr><tr> 
     <td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Select$5&#39;)">Select</a></td><td>PP</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td> 
    </tr><tr> 
     <td colspan="6"><table> 
      <tr> 
       <td><span>1</span></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$2&#39;)">2</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$3&#39;)">3</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$4&#39;)">4</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$5&#39;)">5</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$6&#39;)">6</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$7&#39;)">7</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$8&#39;)">8</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$9&#39;)">9</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$10&#39;)">10</a></td><td><a href="javascript:__doPostBack(&#39;GridViewName&#39;,&#39;Page$11&#39;)">...</a></td> 
      </tr> 
     </table></td> 
    </tr> 
</table> 

+1

發表您的HTML .. –

+0

看到我的編輯,添加HTML – muttley91

+0

你的第二個選擇似乎在這裏工作:http://jsfiddle.net/TCSrf/ – Adrift

回答

0

退房this article,就如何風格在GridView的詳細演示。

最值得注意的是PagerStyle-CssClass屬性。