收缩单元格(在绝对定位的ASP.NET表中)以适合其内容?
我的网页当前看起来像这样:收缩单元格(在绝对定位的ASP.NET表中)以适合其内容?,asp.net,width,cell,Asp.net,Width,Cell,我的网页当前看起来像这样: 但我需要它看起来像这样: “Content1”的大小未知,表必须进行调整以适应它,但不会从“Content2”中占用任何不必要的空间。我不能使用“display:table”,因为IE7等不支持它,因此,我几乎无法使用常规的table元素,除非旧浏览器支持更好的元素 有人知道如何做到这一点吗?为什么不在Content2单元格中添加一个宽度?比如: <asp:Table runat="server" style="position: absolute;
但我需要它看起来像这样:
“Content1”的大小未知,表必须进行调整以适应它,但不会从“Content2”中占用任何不必要的空间。我不能使用“display:table”,因为IE7等不支持它,因此,我几乎无法使用常规的table元素,除非旧浏览器支持更好的元素
有人知道如何做到这一点吗?为什么不在Content2单元格中添加一个宽度?比如:
<asp:Table runat="server" style="position: absolute;
left: 0%; top: 82%; right: 0%; bottom: 0%; width: 100%; height: 18%"
CellPadding="0" CellSpacing="0" GridLines="Both">
<asp:TableRow>
<asp:TableCell>
Content1
</asp:TableCell>
<asp:TableCell Width="2.5%">
</asp:TableCell>
<asp:TableCell Width="97.5%">
Content2
</asp:TableCell>
</asp:TableRow>
</asp:Table>
内容1
内容2
为什么不在Content2单元格中添加宽度?比如:
<asp:Table runat="server" style="position: absolute;
left: 0%; top: 82%; right: 0%; bottom: 0%; width: 100%; height: 18%"
CellPadding="0" CellSpacing="0" GridLines="Both">
<asp:TableRow>
<asp:TableCell>
Content1
</asp:TableCell>
<asp:TableCell Width="2.5%">
</asp:TableCell>
<asp:TableCell Width="97.5%">
Content2
</asp:TableCell>
</asp:TableRow>
</asp:Table>
内容1
内容2