我有一个项目,第一个用户上传一些文件,然后管理员批准....我在转发表中显示文件并使用它,所以当管理员登录并点击提交按钮批准这样的文件请检查图片 像这样:
当我点击提交按钮时,表格完全改变了这样的不同外观,它显示了一些非常长的列:
这是ASPX.CS PAGE
<div class="CSSTableGenerator">
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="results">
<asp:Repeater ID="Repeater2" OnItemCommand="Repeater2_ItemCommand"
runat="server" OnItemDataBound="Repeater2_ItemDataBound">
<HeaderTemplate>
<tr>
<%--<td></td>--%>
<td>DocumentID</td>
<td>Document Name</td>
<td>File Name</td>
<td>Uploaded By</td>
<td>Email</td>
<td>Department</td>
<td>Status</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><asp:Label ID="DocId" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "DocID")%>'></asp:Label></td>
<td><asp:Label ID="DocName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "DocName")%>'></asp:Label></td>
<td><asp:Label ID="Uploadfile" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Uploadfile")%>'></asp:Label></td>
<td><asp:Label ID="Label1" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "UploadedBy")%>'></asp:Label></td>
<td><asp:Label ID="YourEamil" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "UserEmail")%>'></asp:Label></td>
<td><asp:Label ID="DepType" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "DepType")%>'></asp:Label></td>
<td>
<asp:Label ID="lblCountry" runat="server" Text='<%# Eval("ApproveID") %>' Visible="false" />
<asp:DropDownList ID="DropDownList4" runat="server" EnableViewState="true" class="vpb_dropdown1" DataTextField="ApproveType" DataValueField="ApproveID" AutoPostBack="true" OnSelectedIndexChanged="DropDownList4_SelectedIndexChanged">
<asp:ListItem Text="Pending" Selected="selected" Value="3"></asp:ListItem>
<asp:ListItem Text="Approve" Value="1"></asp:ListItem>
<asp:ListItem Text="Reject" Value="2"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</div>
这是CSS
.CSSTableGenerator {
margin:0px;padding:0px;
width:100%;
box-shadow: 10px 10px 5px #888888;
border:1px solid #ffffff;
-moz-border-radius-bottomleft:0px;
-webkit-border-bottom-left-radius:0px;
border-bottom-left-radius:0px;
-moz-border-radius-bottomright:0px;
-webkit-border-bottom-right-radius:0px;
border-bottom-right-radius:0px;
-moz-border-radius-topright:0px;
-webkit-border-top-right-radius:0px;
border-top-right-radius:0px;
-moz-border-radius-topleft:0px;
-webkit-border-top-left-radius:0px;
border-top-left-radius:0px;
}.CSSTableGenerator table{
width:100%;
height:100%;
margin:0px;padding:0px;
}.CSSTableGenerator tr:last-child td:last-child {
-moz-border-radius-bottomright:0px;
-webkit-border-bottom-right-radius:0px;
border-bottom-right-radius:0px;
}
.CSSTableGenerator table tr:first-child td:first-child {
-moz-border-radius-topleft:0px;
-webkit-border-top-left-radius:0px;
border-top-left-radius:0px;
}
.CSSTableGenerator table tr:first-child td:last-child {
-moz-border-radius-topright:0px;
-webkit-border-top-right-radius:0px;
border-top-right-radius:0px;
}.CSSTableGenerator tr:last-child td:first-child{
-moz-border-radius-bottomleft:0px;
-webkit-border-bottom-left-radius:0px;
border-bottom-left-radius:0px;
}.CSSTableGenerator tr:hover td{
background-color:#d3e9ff;
}
.CSSTableGenerator td{
vertical-align:middle;
background-color:#aad4ff;
border:1px solid #ffffff;
border-width:0px 1px 1px 0px;
text-align:center;
padding:7px;
font-size:9px;
font-family:Arial;
font-weight:normal;
color:#000000;
}.CSSTableGenerator tr:last-child td{
border-width:0px 1px 0px 0px;
}.CSSTableGenerator tr td:last-child{
border-width:0px 0px 1px 0px;
}.CSSTableGenerator tr:last-child td:last-child{
border-width:0px 0px 0px 0px;
}
.CSSTableGenerator tr:first-child td{
background:-o-linear-gradient(bottom, #0057af 5%, #0057af 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0057af), color-stop(1, #0057af) );
background:-moz-linear-gradient( center top, #0057af 5%, #0057af 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0057af", endColorstr="#0057af"); background: -o-linear-gradient(top,#0057af,0057af);
background-color:#0057af;
border:0px solid #ffffff;
text-align:center;
border-width:0px 0px 1px 1px;
font-size:9px;
font-family:Arial;
font-weight:normal;
color:#ffffff;
}
.CSSTableGenerator tr:first-child:hover td{
background:-o-linear-gradient(bottom, #0057af 5%, #0057af 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0057af), color-stop(1, #0057af) );
background:-moz-linear-gradient( center top, #0057af 5%, #0057af 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0057af", endColorstr="#0057af"); background: -o-linear-gradient(top,#0057af,0057af);
background-color:#0057af;
}
.CSSTableGenerator tr:first-child td:first-child{
border-width:0px 0px 1px 0px;
}
.CSSTableGenerator tr:first-child td:last-child{
border-width:0px 0px 1px 1px;
}
.CSSTableGenerator span {font-size:9px;}
.CSSTableGenerator td
{
padding-left: 4px;
padding-right: 4px;
}
任何人都可以告诉我这个问题出在哪里了?
答案 0 :(得分:0)
.CSSTableGenerator table{
width:100%;
height:inherit;
margin:0px;padding:0px;
}
使用inherit
替换高度值100%