Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP.net markup problem with table alignment

Posted on 2016-10-18
2
Medium Priority
?
97 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:Murray Brown
[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 53

Accepted Solution

by:
Ryan Chong earned 2000 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:Murray Brown
ID: 41854879
Thanks very much
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

610 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