Solved

ASP.net markup problem with table alignment

Posted on 2016-10-18
2
54 Views
Last Modified: 2016-10-21
Hi

I have a table on my ASP.net web form, the markup for which is shown below. There are tables inside the cells of the main table. I moved a button onto it temporarily in design view and it threw the alignment out on the boxes for foreman. How do I correct this?

1
<table>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label1" runat="server" Text="Supervisor Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtSupervisorName" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label3" runat="server" Text="Supervisor Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtSupervisorSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                    </table>

                </td>
                <td></td>
                <td>
                                        <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label4" runat="server" Text="Geologist Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtGeologistName" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label5" runat="server" Text="Geologist Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td class="auto-style1">
                           <asp:TextBox ID="txtGeologistSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                    </table>
                </td>
                <td></td>
                <td class="auto-style2">
                                        <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label6" runat="server" Text="Foreman Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtForemanName" runat="server" Width="193px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label7" runat="server" Text="Foreman Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtForemanSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                            <tr>
                                                <td></td>
                                            </tr>
                    </table>
                </td>
                <td></td>
                <td>
                                        <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label8" runat="server" Text="Mine Overseer Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtMineOverseer" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label9" runat="server" Text="Mine Overseer Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtMineOverseerSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                    </table>
                </td>
                <td>
                     &nbsp;</td>
                <td>
                                        <table>
                   <tr>
                       <td>
                     <asp:Button ID="printButton" runat="server" Text="Print Page" OnClientClick="javascript:window.print();" Width="180px" />
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:Button ID="btnHideUnusedColumns" runat="server" Text="Hide Unused Columns" Width="180px" />
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Button ID="btnShowUnusedColumns0" runat="server" Text="Show Unused Columns" Width="180px" />
                                     </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:Button ID="btnBackToCalendar" runat="server" Text="Back to Calendar" Width="180px" />
                       </td>
                   </tr>
                    </table>
                </td>
            </tr>
        </table>
0
Comment
Question by:murbro
2 Comments
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41847988
delete the extra:

<tr>
                                                <td></td>
                                            </tr>

Open in new window

hence, you would need this instead:
<table>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label1" runat="server" Text="Supervisor Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtSupervisorName" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label3" runat="server" Text="Supervisor Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtSupervisorSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                    </table>

                </td>
                <td></td>
                <td>
                                        <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label4" runat="server" Text="Geologist Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtGeologistName" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label5" runat="server" Text="Geologist Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td class="auto-style1">
                           <asp:TextBox ID="txtGeologistSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                    </table>
                </td>
                <td></td>
                <td class="auto-style2">
                                        <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label6" runat="server" Text="Foreman Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtForemanName" runat="server" Width="193px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label7" runat="server" Text="Foreman Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtForemanSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                            
                    </table>
                </td>
                <td></td>
                <td>
                                        <table>
                   <tr>
                       <td>
                           <asp:Label ID="Label8" runat="server" Text="Mine Overseer Name"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtMineOverseer" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Label ID="Label9" runat="server" Text="Mine Overseer Signature"></asp:Label>
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:TextBox ID="txtMineOverseerSignature" runat="server" Width="180px"></asp:TextBox>
                       </td>
                   </tr>
                    </table>
                </td>
                <td>
                     &nbsp;</td>
                <td>
                                        <table>
                   <tr>
                       <td>
                     <asp:Button ID="printButton" runat="server" Text="Print Page" OnClientClick="javascript:window.print();" Width="180px" />
                       </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:Button ID="btnHideUnusedColumns" runat="server" Text="Hide Unused Columns" Width="180px" />
                       </td>
                   </tr>
                                 <tr>
                       <td>
                           <asp:Button ID="btnShowUnusedColumns0" runat="server" Text="Show Unused Columns" Width="180px" />
                                     </td>
                   </tr>
                      <tr>
                       <td>
                           <asp:Button ID="btnBackToCalendar" runat="server" Text="Back to Calendar" Width="180px" />
                       </td>
                   </tr>
                    </table>
                </td>
            </tr>
        </table>

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 41854879
Thanks very much
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question