Solved

ASP.net markup problem with table alignment

Posted on 2016-10-18
2
62 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

733 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