我在单元格表中有一个表。我希望桌子占据整个空间。看起来表格只占据单元格的中心。
<asp:ListView ID="EmployeeListView" runat="server">
<LayoutTemplate>
<table id="tblEmployee">
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>
<table style = "width: 100%; border-collapse: collapse; padding: 0">
<tr>
<td class = "aprovGriditem">
<asp:Label ID="Label1" runat="server" Text="3:15"></asp:Label>
</td>
</tr>
<tr>
<td class = "aprovGridalt">
<asp:Label ID="Label2" runat="server" Text="0:45"></asp:Label>
</td>
</tr>
</table>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
我希望内表的两个单元格均匀地占据外单元格的整个空间,而不是集中在中间并在它们周围留出空间。
#tblEmployee
{
border-collapse: collapse;
height: 100%;
width: 100%;
}
#tblEmployee th
{
background-color: #BBC6E3;
height: 25px;
}
.aprovGriditem
{
border: 2px solid #BBC6E3;
padding: 0;
width: 100%;
}
.aprovGridalt
{
background-color: #BBC6E3;
border: 2px solid #BBC6E3;
padding: 0;
width: 100%;
}