2017-02-27 47 views
1

設計問題。 .................................................. .................................................. ...無法在網頁中放入asp.net表格單元格

我正在努力把「主基準目標」表格單元正確。我嘗試了各種風格,但它沒有幫助。提前致謝。

要求: enter image description here

我的O/P: enter image description here

CSS:

.labels { 
    font-size: 9pt; 
    font-weight: bold; 
    font-family: Calibri; 
} 

的Html

<fieldset style="border: solid; border-width: thin; width: 95%; height: 200px; border-color: #a8a8a8; margin: auto;"> 
    <legend id="Legend14" runat="server" visible="true" style="width: auto; margin-bottom: 0px; font-size: 12px; font-weight: bold; color: #1f497d;">&nbsp;&nbsp; Project Performance &nbsp;&nbsp;</legend> 
    <div style="margin-bottom: 10px; margin-left: 10px;"> 
     <asp:Table ID="table8" runat="server" CssClass="labels"> 
      <asp:TableRow> 
       <asp:TableCell> 
        Critical to Quality (CTQ) &nbsp;&nbsp; 
       </asp:TableCell> 
       <asp:TableCell> 
        <asp:TextBox runat="server" Width="590px" Height="23px" ></asp:TextBox> 
       </asp:TableCell> 
      </asp:TableRow> 
      <asp:TableRow> 
       <asp:TableCell> 
        Baseline Performance &nbsp;&nbsp; 
       </asp:TableCell> 
       <asp:TableCell> 
        <asp:TextBox runat="server" Width="590px" Height="23px" ></asp:TextBox> 
       </asp:TableCell> 
      </asp:TableRow> 
      <asp:TableRow> 
       <asp:TableCell> 
        Primary Metric &nbsp;&nbsp; 
       </asp:TableCell> 
       <asp:TableCell> 
        <asp:TextBox runat="server" Width="95px" Height="23px" ></asp:TextBox> 
       </asp:TableCell> 
       <asp:TableCell> 
        Primary Baseline Target &nbsp;&nbsp; 
       </asp:TableCell> 
       <asp:TableCell> 
        <asp:TextBox runat="server" Width="95px" Height="23px" ></asp:TextBox> 
       </asp:TableCell> 
      </asp:TableRow> 
      <asp:TableRow> 
       <asp:TableCell> 
        Secondary Metric &nbsp;&nbsp; 
       </asp:TableCell> 
       <asp:TableCell> 
        <asp:TextBox runat="server" Width="590px" Height="23px" ></asp:TextBox> 
       </asp:TableCell> 
      </asp:TableRow> 
      <asp:TableRow> 
       <asp:TableCell> 
        Target performance &nbsp;&nbsp; 
       </asp:TableCell> 
       <asp:TableCell> 
        <asp:TextBox runat="server" Width="590px" Height="23px" ></asp:TextBox> 
       </asp:TableCell> 
      </asp:TableRow> 
      <asp:TableRow> 
       <asp:TableCell> 
        Performance at Project Close &nbsp;&nbsp; 
       </asp:TableCell> 
       <asp:TableCell> 
        <asp:TextBox runat="server" Width="590px" Height="23px" ></asp:TextBox> 
       </asp:TableCell> 
      </asp:TableRow> 
     </asp:Table> 
    </div> 
</fieldset> 

回答

1

你需要跨越的行的列,而不兩個文本框與ColumnSpan。基本上你需要4列,但只有第3和第4行需要這4列。在所有其他行上,你不使用它們,所以你將不得不從第二列開始跨越那些列。

<asp:Table ID="table8" runat="server" CssClass="labels"> 
    <asp:TableRow> 
     <asp:TableCell> 
      Critical to Quality (CTQ) &nbsp;&nbsp; 
     </asp:TableCell> 
     <asp:TableCell ColumnSpan="3"> 
      <asp:TextBox runat="server" Width="590px" Height="23px" ></asp:TextBox> 
     </asp:TableCell> 
    </asp:TableRow> 
    <asp:TableRow> 
     <asp:TableCell> 
      Baseline Performance &nbsp;&nbsp; 
     </asp:TableCell> 
     <asp:TableCell ColumnSpan="3"> 
      <asp:TextBox runat="server" Width="590px" Height="23px" ></asp:TextBox> 
     </asp:TableCell> 
    </asp:TableRow> 
    <asp:TableRow> 
     <asp:TableCell> 
      Primary Metric &nbsp;&nbsp; 
     </asp:TableCell> 
     <asp:TableCell> 
      <asp:TextBox runat="server" Width="95px" Height="23px" ></asp:TextBox> 
     </asp:TableCell> 
     <asp:TableCell> 
      Primary Baseline Target &nbsp;&nbsp; 
     </asp:TableCell> 
     <asp:TableCell> 
      <asp:TextBox runat="server" Width="95px" Height="23px" ></asp:TextBox> 
     </asp:TableCell> 
    </asp:TableRow> 
</asp:Table> 
+0

讓我試試..... – Sak

相關問題