GridLines color in IE and FF
I have a grid set to true in the gridview, I want the lines to be gray. By default, IE strings appear grayed out due to my style sheets; but Firefox has a dark line separating the header columns.
I tried to add
this.GridView1.Attributes.Add("bordercolor", "#ddd");
This fixes the FireFox issue, but in IE it displays dark lines.
+2
source to share
2 answers
Is there a reason why you are doing this programmatically?
If you open the html file (.ascx, .aspx) you can set the inline style in the grid with style = "border: 1px solid #ddd;" or it is preferable to use the CssClass property of the grid and point it to the outer style CssClass="myGridStyle"
where myGridStyle is defined as
.myGridStyle {
border:1px solid #ddd;
}
+1
source to share