Solved

ASP.net markup problem with table alignment

Posted on 2016-10-18
2
32 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 49

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now