以这样的方式设计HTML表单,使所有文本框在同一点结束

时间:2016-02-19 14:30:27

标签: html css asp.net

我想设计一个包含冗长文本框的HTML表单,所有这些文本框都应该在同一点结束。

文本框应该在问题之后立即开始。以下是供参考的图片。

HTML Page

您能否提供相同的HTML标记。

这是标记:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title></title>
</head>

<body>
    <table class="general" border="0" cellpadding="5">
        <tr>
            <td class="tableBody1" colspan="2"> <strong>Implementation Licensee Information</strong> </td>
        </tr>
        <tr>
            <td class="bodyText1LIC"> Name and Title&nbsp; </td>
            <td valign="top" class="tableBody1">
                <asp:TextBox ID="txtPurchasingAgentName" runat="server" MaxLength="255" />
                <asp:RequiredFieldValidator EnableClientScript="False" runat="server" ControlToValidate="txtPurchasingAgentName" ID="rfvPurchasingAgentName" Display="Dynamic" ErrorMessage="Purchasing Agent Name Required" Text="&lt;img src='../images/errorIcon.png' alt='Error Icon'  tabindex='-1' /&gt;" /> </td>
        </tr>
        <tr>
            <td class="bodyText1LIC"> Company Name and Division&nbsp; </td>
            <td valign="top" class="tableBody1">
                <asp:TextBox ID="txtPurchasingAgentMailingAddress" runat="server" MaxLength="255" />
                <asp:RequiredFieldValidator EnableClientScript="False" runat="server" ControlToValidate="txtPurchasingAgentMailingAddress" ID="rfvPurchasingAgentMailingAddress" Display="Dynamic" ErrorMessage="PurchasingAgent Mailing address Required" Text="&lt;img src='../images/errorIcon.png' alt='Error Icon'  tabindex='-1' /&gt;" /> </td>
        </tr>
        <tr>
            <td class="bodyText1LIC"> Complete Mailing Address&nbsp; </td>
            <td valign="top" class="tableBody1">
                <asp:TextBox ID="txtPAPCI_WebAddress" runat="server" MaxLength="255" /> </td>
        </tr>
        <tr>
            <td class="bodyText1LIC"> Direct Telephone No.&nbsp; </td>
            <td valign="top" class="tableBody1">
                <asp:TextBox ID="TextBox1" runat="server" MaxLength="255" /> </td>
        </tr>
        <tr>
            <td class="bodyText1LIC"> Email Address&nbsp; </td>
            <td valign="top" class="tableBody1">
                <asp:TextBox ID="TextBox2" runat="server" MaxLength="255" /> </td>
        </tr>
    </table>
</body>

</html>
&#13;
&#13;
&#13;

2 个答案:

答案 0 :(得分:0)

https://jsfiddle.net/rizalishan/rdvoumkf/1/

@media screen and (max-width: 680px)

答案 1 :(得分:-1)

您可以使用表格,不要为表格提供任何边框。最终你也可以在表中添加css。不要给桌子边框。