asp.net - Gridview CSS borders inconsistent -
This is actually annoying me. I am using a gridview and want to format it in such a way that all Borders are displayed in browsers only. Right now, I'm changing the result between IE, FF and Chrome. I'm not sure what I'm doing wrong in my CSS (I am quite new to CSS), but something should be right because at any time the browser displays the boundaries correctly at any time. Gridview CSS is as follows:
.gridViewData {height: auto; Width: 544px; Status: Relative; Text-align: center; Background color: # 7D9EBA; Border: solid thin black; Boundary-right: no 0 px black; } .gridViewData td {padding: 2px; Border-top-style: none; Border-bottom-style: solid; Border-left-style: solid; Border-right-style: none; Border-color: black; Border-width: thin; } .gridViewData th {height: 10px; Width: 544px; Status: Relative; Text-align: center; Border-top-style: dashed; Border-bottom-style: solid; Border-left-style: solid; Border-right-style: none; Border-color: black; Border-width: thin; Background color: white; } .gridViewData .alt {background color: red; } .gridViewData .pgr {background color: orange; }
I should look like this crude attempt on a desk: D. There should be no limit between the cells in the header.
____________________________ | ____________________________ | | ___ | __________ | ________ | ____ | | ___ | __________ | ________ | ____ | | ___ | __________ | ________ | ____ |
In IE, there is no limit on the top, in FF, it looks fine that there are separators in the header in Chrome. It's been annoying me for a while, so hopefully someone There will be some light on this.
Thanks
Instead of implementing the CDS, gridwit properties Use Generate Table Elements For example, the header can be styled by applying the CSS to the property:
Edit:
Note that the declaratory frontline character combines an inline style declaration that applies only to the table, the individual cells But not at BorderColor does not use an inline style being added as a specialty program, but the HTML uses BorderColor property, which is applied to all borders within the browsers table:
OnRowDataBound = "MyGrid_RowDataBound" protected minus MyGrid_RowDataBound (object this, GridViewRowEventArgs e) {foreach (TableCell TC in e.Row.Cells) {tc.Attributes ["style"] = "border color: # 000"; }}
I put a blog post about it - check out Lee Damond's comment:
Comments
Post a Comment