html - 边框不延伸 - css

标签 html asp.net css

底部边框只到文本框的末尾。我在 visual studio 2010 工作。相同的代码在另一台 PC 上工作正常。为什么

<div style="clear: both; max-width: 2400px">
        <table style="border: 1px solid gray" width="100%">
            <tr>
                <td width="20%">
                    NAME
                </td>
                <td width="40%">
                    <asp:TextBox ID="TextBox1" runat="server" Width="98%"></asp:TextBox>
                </td>
                <td width="40%">
                </td>
            </tr>
            <tr>
                <td>
                    AGE
                </td>
                <td>
                    <asp:TextBox ID="TextBox2" runat="server" Width="98%"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>

enter image description here

最佳答案

您缺少第二行中的第三个 TD。插入它,它就会出现。

<table style="border: 1px solid gray" width="100%">
        <tr>
            <td width="20%">
                NAME
            </td>
            <td width="40%">
                <asp:TextBox ID="TextBox1" runat="server" Width="98%"></asp:TextBox>
            </td>
            <td width="40%">
            </td>
        </tr>
        <tr>
            <td>
                AGE
            </td>
            <td>
                <asp:TextBox ID="TextBox2" runat="server" Width="98%"></asp:TextBox>
            </td>
            <td>
            </td>
        </tr>
    </table>

关于html - 边框不延伸 - css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18891705/

相关文章:

c# - HttpOnly Cookie 的问题

c# - 如何使用 ClosedXML 在同一 Excel 单元格中使用不同颜色的文本?

asp.net - 在 Azure 计算模拟器外部使用 DiagnosticMonitorTraceListener 运行

Javascript if/else 没有按预期工作

php - 如何修复mysql从till到日期和时间的读取?

javascript - 如何将内容传递到客户端 html 页面中的元素?

javascript - 在叠加 div 上显示警告消息

javascript - 如何执行第二个 jQuery 片段以添加 html 代码

html - 同一位置上的两个 DIV - 但不与其他内容重叠

html - 水平和垂直居中 div 并在调整父级大小时保持居中