Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
收缩单元格(在绝对定位的ASP.NET表中)以适合其内容?_Asp.net_Width_Cell - Fatal编程技术网

收缩单元格(在绝对定位的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