【问题标题】:Fit table cell width to be the same as asp image width使表格单元格宽度与 asp 图像宽度相同
【发布时间】:2021-09-28 10:16:48
【问题描述】:

我在表格单元格中有下面的 asp 图像:

    <tr>
        <td>
            <asp:Image runat="server" Width="64px" Height="64px" ImageUrl="~/Images/user64.png" />               
        </td>
        <td>
            <div class="employee-group">                    
                <asp:Label runat="server" ID="lblEmployeeFullname" Text="Claude" ></asp:Label>
                <asp:Label runat="server" ID="lblIdEmployee" Text="34343d-dfadfsf-3433"></asp:Label>
            </div>
        </td>
    </tr>

我正在尝试将表格单元格宽度调整为与图像宽度相同。我该怎么做?

【问题讨论】:

  • 如果你知道图片尺寸,CSS就足够了吗?
  • 使用&lt;td width="1"&gt;

标签: html css asp.net html-table webforms


【解决方案1】:

使用此设置创建样式。

表{表布局:固定; } td { 宽度:50%; }

【讨论】:

    猜你喜欢
    • 2015-07-13
    • 2014-01-06
    • 2019-11-16
    • 1970-01-01
    • 2013-04-26
    • 2014-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多