2016-02-19 23 views
-9

我想設計一個包含冗長文本框的HTML表單,並且它們都應該在同一點結束。以所有文本框在同一點結束的方式設計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>

+4

都能跟得上,我們不這樣做,只是嘗試一些你自己的第一次,我們可以幫你呢。 –

+4

顯示迄今爲止所做的工作 – LGSon

+6

預計您至少會嘗試爲自己編寫代碼。堆棧溢出不是代碼寫入服務。我建議你做一些額外的研究,無論是通過谷歌或通過搜索,做一個嘗試和。如果您仍然遇到麻煩,請返回**您的代碼**並解釋您嘗試過的以及爲什麼它不起作用。 –

回答

-1

你可以使用一個表,不給任何邊界表。最終你也可以在表格中添加CSS。不要給桌子邊框。

0

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

<div id="container"> 
    <div id="left"> This div is as big as it's content</div> 
    <div id="right"><input type="text" style="width:100%" /></div> 
</div> 

#left { 
background: #aaa; 
float: left} 

#right { 
background: cyan; 
overflow: hidden} 
相關問題