I recently created a GridView using asp.net with a black border color. However, I encountered an issue where certain lines were showing up in white which I didn't want to see. It seems there may be a problem when working with child elements, particularly in IE. Below is the styling code that I directly added to the aspx file:
<style type="text/css">
.GridView2 tbody tr th {
border-top: thin solid white;
border-left:thin solid white;
padding:5px;
text-align:center;
}
.GridView2 tbody tr td {
border-top: thin solid white;
border-left:thin solid white;
}
.GridView2 tbody tr:last-child td{
border-bottom:thin solid white;
}
.GridView2 tbody tr th:last-child,.GridView2 tbody td:last-child{
border-right:thin solid white;
}
.GridView2 tbody tr td{
padding:5px;
}
</style>
Next, here is the asp code used for my project:
<asp:GridView ID="GridView1" runat="server" CellPadding="5" HeaderStyle-BorderStyle="None"
BorderColor="Black" BorderStyle="Solid" AllowPaging="True" AutoGenerateColumns="false" PageSize="25" DataSourceID="DataSource_struktur"
AllowSorting="True" ForeColor="#666666" CellSpacing="1" DataFormatString="{0:###,###,###,###,###}"
CaptionAlign="Left" Width="400px" HeaderStyle-HorizontalAlign="Left" HorizontalAlign="Left" CssClass="GridView2">
<Columns>
<asp:BoundField ReadOnly=true HeaderText="Master Accounts" DataFormatString="{0:#,0} CMA" DataField="cma" SortExpression="cma" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundField>
<asp:BoundField ReadOnly=true DataField="sa_cnt" HeaderText="Service Accounts" SortExpression="sa_cnt" HeaderStyle-HorizontalAlign="Center" >
<ControlStyle Font-Bold="False" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" ForeColor="#666666" />
<PagerSettings Mode="Numeric" />
<PagerStyle ForeColor="#11AAFF" Font-Names='"Trebuchet MS", Arial, Sans'
Font-Size="12px" HorizontalAlign="Left" />
<RowStyle HorizontalAlign="Left" VerticalAlign="Top" />
Unfortunately, I am unable to provide screenshots of the tables due to limited reputation on this platform.