In my current CSS file, I have defined two id selectors:
#TableHead {
font-family: Arial, Helvetica, sans-serif;
font-size:11px;
font-weight: bold;
color: #000000;
border-top-width: thin;
border-top-style: solid;
border-top-color: #A9AAAA;
border-bottom-width: thin;
border-bottom-style: solid;
border-bottom-color: #A9AAAA;
}
#TableDivs {
border-bottom-width: 1px;
font-size:11px;
border-bottom-style: dotted;
font-family:Arial, Helvetica, sans-serif;
border-bottom-color: #A9AAAA;
}
My goal is to style the Gridview header using "TableHead" and the rest of the Gridview control using "TableDivs." I have successfully applied TableDivs by enclosing the gridview in a div section. How can I utilize TableHead to style the header? Where should I specify id="TableHead"?
The rendered source code of the Gridview after adding the div section is as follows:
<div id="TableDivs">
<div>
<table cellspacing="0" rules="all" border="0" id="ctl00_Main_GridView1" style="border-width:0px;font-weight:normal;border-collapse:collapse;">
<tr>
<th align="left" scope="col">
<a href="javascript:__doPostBack('ctl00$Main$GridView1','Sort$FileName')">File Name</a>
</th>
<th align="left" scope="col"><a href="javascript:__doPostBack('ctl00$Main$GridView1','Sort$Description')">Description</a>
</th>
<th align="left" scope="col"><a href="javascript:__doPostBack('ctl00$Main$GridView1','Sort$GroupName')">Folder Name</a>
</th>
<th align="left" scope="col">
<a href="javascript:__doPostBack('ctl00$Main$GridView1','Sort$TimeAdded')">Date Added</a>
</th>
</tr>
<tr>
<td style="width:30%;">
<a id="ctl00_Main_GridView1_ctl02_btnDownload" href="javascript:__doPostBack('ctl00$Main$GridView1$ctl02$btnDownload','')">2.txt</a>
</td>
<td style="width:40%;">222222</td><td style="width:25%;">group11</td>
<td style="width:5%;">
<span id="ctl00_Main_GridView1_ctl02_lblDateAdded"></span>
</td>
</tr>
<tr>
...
</tr>
</table>
</div>
</div>