2010-12-01 30 views
1

好的,所以这是在扰乱我。我在ASP.net一个gridview,我已经启用的页脚:然后我设置页脚CSS样式ASP.net从CSS中的Gridview页脚中删除列边框。只是不会离开!

<asp:GridView ID="Results_GridView" runat="server" AutoGenerateColumns="False" CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" ShowFooter="True" GridLines="None"> 

<FooterStyle CssClass="footer" /> 

这一切都显示正常,显示图像等等,虽然我不能摆脱上面的列的边界!

.mGrid { width: 100%; background-color: #fff; margin: 5px 0 10px 0; border: solid 1px #525252; border-collapse:collapse; } 
.mGrid td { padding: 2px; border: solid 1px #c1c1c1; color: #717171; } 
.mGrid th { padding: 4px 2px; color: #fff; background: #424242 url(grd_head.png) repeat-x top; border-left: solid 1px #525252; font-size: 0.9em; } 
.mGrid .alt { background: #fcfcfc url(grd_alt.png) repeat-x top;} 
.mGrid .footer { 
height: 15px; width: 100%; background: #BCC51A url(grd_footer.png) repeat-x top; border- spacing: 0; border-width: 0; border: none; border-left:none; border-right:none; border-style:none; 
} 

,他们只是不会消失:(我试图改变在Visual Studio中的边界也没有运气。

我的继承人整个ASPX文件以供参考

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DiscTypeSelector.aspx.vb"  Inherits="DiskSelector" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<%@ import Namespace="System.Data" %> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
<title>Disc Burst Selector</title> 
<link type="text/css" rel="stylesheet" href="css/style.css" /> 
</head> 
<body> 

<form id="form1" runat="server"> 
<div> 
    <asp:Panel ID="Panel1" runat="server" Width="400px" BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Justify"> 
     <asp:Label ID="Label1" runat="server" Text="Burst Pressure " Width="122px"> </asp:Label> 
     <asp:TextBox ID="pressure_input" runat="server" Width="150px">0</asp:TextBox><br /> 
     <br /> 
     <asp:Label ID="lbltemp" runat="server" Text="Temperature" Width="122px"> </asp:Label> 
     <asp:TextBox ID="temp_input" runat="server" Width="150px">0</asp:TextBox><br /> 
     <br /> 
     <asp:Label ID="lblBore" runat="server" Text="Nominal Bore (mm)" Width="122px"> </asp:Label> 
     <asp:DropDownList ID="dropBore" runat="server" Width="69px" AutoPostBack="False"> 
      <asp:ListItem>15</asp:ListItem> 
      <asp:ListItem>25</asp:ListItem> 
      <asp:ListItem>40</asp:ListItem> 
      <asp:ListItem>50</asp:ListItem> 
      <asp:ListItem>65</asp:ListItem> 
      <asp:ListItem>80</asp:ListItem> 
      <asp:ListItem>100</asp:ListItem> 
      <asp:ListItem>150</asp:ListItem> 
      <asp:ListItem>200</asp:ListItem> 
      <asp:ListItem>250</asp:ListItem> 
      <asp:ListItem>300</asp:ListItem> 
      <asp:ListItem>350</asp:ListItem> 
      <asp:ListItem>400</asp:ListItem> 
      <asp:ListItem>450</asp:ListItem> 
      <asp:ListItem>500</asp:ListItem> 
      <asp:ListItem>600</asp:ListItem> 
      <asp:ListItem>700</asp:ListItem> 
      <asp:ListItem>800</asp:ListItem> 
     </asp:DropDownList><br /> 
     <br /> 
     <asp:Label ID="lblFrag" runat="server" Text="Fragmentation Issue"></asp:Label> 
     <asp:RadioButtonList ID="radioFrag" runat="server" RepeatDirection="Horizontal" 
      RepeatLayout="Flow" Width="94px"> 
      <asp:ListItem Selected="True">Yes</asp:ListItem> 
      <asp:ListItem>No</asp:ListItem> 
     </asp:RadioButtonList><br /> 
     <br /> 
     <asp:Label ID="lblMounting" runat="server" Text="Mounting" Width="111px"> </asp:Label> 
     <asp:DropDownList ID="dropMounting" runat="server" Width="130px"> 
      <asp:ListItem>PN6</asp:ListItem> 
      <asp:ListItem>PN10</asp:ListItem> 
      <asp:ListItem>PN16</asp:ListItem> 
      <asp:ListItem>PN20</asp:ListItem> 
      <asp:ListItem>PN25</asp:ListItem> 
      <asp:ListItem>PN40</asp:ListItem> 
      <asp:ListItem>ANSI 150</asp:ListItem> 
      <asp:ListItem>ANSI 300</asp:ListItem> 
      <asp:ListItem>ANSI 600</asp:ListItem> 
      <asp:ListItem>Other</asp:ListItem> 
     </asp:DropDownList><br /> 
     <br /> 
     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 
     <asp:Button ID="btnSubmit" runat="server" Height="40px" Text="Update results" Width="140px" UseSubmitBehavior="False" CssClass="updateButtonStyle" /><br /> 
     <br /> 
     <br /> 
    </asp:Panel> 
    <br /> 
    <br /> 

     <asp:GridView ID="Results_GridView" runat="server" AutoGenerateColumns="False" CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" ShowFooter="True" GridLines="None"> 
     <Columns> 
      <asp:BoundField DataField="Disc_Type_Name" HeaderText="Disc Type" SortExpression="Disc_Type_Name" /> 
      <asp:BoundField DataField="Disc_Material_Name" HeaderText="Disc Material" SortExpression="Disc_Material_Name" /> 
      <asp:BoundField DataField="Disc_Forward_Acting" HeaderText="Forward/Reverse" SortExpression="Disc_Forward_Acting" /> 
      <asp:BoundField DataField="Disc_Vacuum" HeaderText="Vacuum Service" SortExpression="Disc_Vacuum" /> 
      <asp:BoundField DataField="Disc_Lgv" HeaderText="Liquid, Gas and Vapour Compatability" 
       SortExpression="Disc_Lgv" /> 
      <asp:TemplateField HeaderText="MAX Working Pressure"> 
      <ItemTemplate> 
    <asp:Label ID="lblMaxPressure" Runat="Server" /> 
</ItemTemplate> 

      </asp:TemplateField> 
      <asp:TemplateField HeaderText="Flange Rating"></asp:TemplateField> 
     </Columns> 
     <AlternatingRowStyle CssClass="alt" /> 
      <FooterStyle CssClass="footer" /> 
      <PagerStyle CssClass="pgr" /> 
    </asp:GridView> 


</div> 
</form> 

还有那些不会消失的小辫子!

http://i.stack.imgur.com/2yN41.png


任何帮助非常感谢! (经历过的网页和类似的线程页)

干杯 tutts :)

回答

1

解决了它。页脚使用相同的td th,这需要在CSS中定义如下。

.footer { height: 15px; width: 100%; background: #BCC51A url(grd_footer.png) repeat-x top; } 
.footer td{border: none} 
.footer th{border: none} 
1

不是通过你的代码筛选相反,我会建议你使用Firebug或IE开发者工具,找出CSS风格是什么导致线路。这通常是成功的最快途径。