【发布时间】:2014-01-03 19:39:12
【问题描述】:
我正在使用 Asp.net 4.0 GridView 控件来显示数据库中的数据。我已将内置主题应用到 GridView。
<asp:GridView ID="gv" runat="server" CellPadding="4" EmptyDataText="No records found."
ForeColor="#333333" OnRowCommand="gv_RowCommand" Width="99%" OnPageIndexChanging="gv_PageIndexChanged"
PageSize="50" AllowPaging="True" GridLines="None" AutoGenerateColumns="true">
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#7C6F57" />
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<HeaderStyle CssClass="GridHeader" BackColor="#1C5E55" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#E3EAEB" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F8FAFA" />
<SortedAscendingHeaderStyle BackColor="#246B61" />
<SortedDescendingCellStyle BackColor="#D4DFE1" />
<SortedDescendingHeaderStyle BackColor="#15524A" /></asp:GridView>
我尝试在我的母版页中强制设置 CSS
.GridHeader { background-color:#1C5E55 !important;}
但我仍然缺少背景颜色。
当页面加载 js/css 内容时,我可以看到背景颜色应用于网格(不到 1 秒)
注意:我已经尝试过清除 IE 缓存,ctrl + F5,shift + reload 等。
这是我的问题的示例页面。
http://vd2.weenggs.com/Items.aspx
电子邮件:test@test.com
通过:测试
.PACP-box:before, .PACP-box:after, .PACP-box-body:after, .PACP-box-body:before
{
background-repeat: no-repeat;
bottom: 0;
content: " ";
line-height: 0;
position: absolute;
top: 0;
}
我发现上面的 CSS 块会导致样式渲染/覆盖问题。我无法删除此块,因为它会导致布局中断。
任何人都可以拥有上述块的备用 CSS。 ?
谢谢
【问题讨论】:
标签: css internet-explorer cross-browser