[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Table layout problems in IE and Firefox - sorry, it's just a browser question

Posted on 2009-02-16
3
Medium Priority
?
211 Views
Last Modified: 2013-12-08
Any ideas for why IE insists on moving the second column over further to the right than it should be?

If I delete lines 168 through 182 the displays goes back to the way it should be, but of course, I need those lines and don't see anything wrong with them.

Also if anyone knows why Firefox puts the gridview on the left.  I can probably fix that with some kind of <span> or <div> tag or even an "align=center"

If someone could help with this that would be awesome!
<%@ Page Language="VB" MasterPageFile="~/Student.master" AutoEventWireup="false" CodeFile="StudentViewProfile.aspx.vb" Inherits="StudentViewProfile" title="Untitled Page" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="information" Runat="Server">
 
<br /><br />
 
<table border="0" cellpadding="0" cellspacing="0" width="600px">
<tr><td width="75px">&nbsp;</td>
    <td width="525px">
 
        <table border="0" cellpadding="0" cellspacing="0" width="525px">
        <tr>
            <td class="EmployerCompanyProfileHeader1" colspan="4">Student Profile:</td>
        </tr>
        <tr><td colspan="4">&nbsp;</td></tr>
        <tr><td colspan="3" class="EmployerWizardSummaryHeader">Contact Information</td>
            <td><asp:HyperLink ID="EditProfile" runat="server" NavigateUrl="~/StudentContactInfo.aspx?from=viewprofile">Edit</asp:HyperLink></td></tr>
        <tr><td colspan="4"><hr style="color:Teal" /></td></tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">EDCC ID Number:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_EDCCID" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">First Name:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_FirstName" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">Last Name:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_LastName" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">Street Address:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_StreetAddress" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">Apartment Number:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_ApartmentNumber" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">City:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_City" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">State:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_State" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">Zip Code:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_ZipCode" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">Phone Number:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_Phone" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">E-mail Address:</td>
            <td class="EmpWizard3">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_EmailAddress" runat="server"></asp:Label>
            </td>
        </tr>
 
        <tr><td colspan="4">&nbsp;</td></tr>
        <tr><td colspan="4">&nbsp;</td></tr>
 
        <tr><td colspan="3" class="EmployerWizardSummaryHeader">Skills</td>
            <td><asp:HyperLink ID="EditSkills" runat="server" NavigateUrl="~/StudentSkills.aspx">Edit</asp:HyperLink></td></tr>
        <tr><td colspan="4"><hr style="color:Teal" /></td></tr>
        <tr>
            <td colspan="4" style="text-align:center">
            
                <table width="250px" border="0" cellpadding="0" cellspacing="0">
                <tr><td class="StudentSkillsHeader">Current Skills</td></tr>
                <tr><td class="StudentAddSkillsMiddle">&nbsp;</td></tr>
                <tr><td class="StudentAddSkillsMiddle">
                        <asp:GridView ID="GV_ShowSkills" runat="server" AutoGenerateColumns="False" 
                            DataSourceID="SqlDataShowSkills" Width="250px" GridLines="Horizontal" 
                            DataKeyNames="Stu_SkillID">
                            <Columns>
                                <asp:BoundField DataField="Stu_Skill" HeaderText="Skill" 
                                    SortExpression="Stu_Skill">
                                    <HeaderStyle ForeColor="#000099" />
                                    <ItemStyle ForeColor="#003366" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Experience" SortExpression="Stu_YearsUsed">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlEditExperience" runat="server" DataTextField="Stu_YearsUsed" SelectedValue='<%# Bind("Stu_YearsUsed") %>'>
                                            <asp:ListItem Value="3 Months">3 Months</asp:ListItem>
                                            <asp:ListItem Value="6 Months">6 Months</asp:ListItem>
                                            <asp:ListItem Value="1 Year">1 Year</asp:ListItem>
                                            <asp:ListItem Value="2 Years">2 Years</asp:ListItem>
                                            <asp:ListItem Value="3 Years">3 Years</asp:ListItem>
                                            <asp:ListItem Value="4 Years">4 Years</asp:ListItem>
                                            <asp:ListItem Value="5 to 10 Years">5 to 10 Years</asp:ListItem> 
                                            <asp:ListItem Value="10+ Years">10+ Years</asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Stu_YearsUsed") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle ForeColor="#000099" />
                                    <ItemStyle ForeColor="#003366" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td></tr>
                <tr><td class="StudentSkillsHeader">&nbsp;</td></tr>
                <tr><td class="StudentSkillsHeader">
                    <asp:SqlDataSource ID="SqlDataShowSkills" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:StudentConnectionString %>" 
                        SelectCommand="SELECT * FROM [skills] WHERE ([Stu_AutoNum] = @Stu_AutoNum) ORDER BY [Stu_Skill], [Stu_YearsUsed]">
                        <SelectParameters>
                            <asp:SessionParameter Name="Stu_AutoNum" SessionField="Stu_AutoNum" Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    </td></tr>
                </table>
                
            </td>
        </tr>
 
        <tr><td colspan="4">&nbsp;</td></tr>
        <tr><td colspan="4">&nbsp;</td></tr>
 
        <tr><td colspan="3" class="EmployerWizardSummaryHeader">Resum&#233;</td>
            <td><asp:HyperLink ID="EditResume" runat="server" NavigateUrl="~/StudentResume.aspx">Edit</asp:HyperLink></td></tr>
        <tr><td colspan="4"><hr style="color:Teal" /></td></tr>
 
        <tr>
            <td colspan="4">
                <table width="525px" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="25px">&nbsp;</td>
                    <td width="500px">
                        <span style="color:Yellow; font-weight:bold;">Your Current Resum&#233;:</span>
                        &nbsp;&nbsp;&nbsp;
                        <asp:HyperLink ID="Hyp_ViewMyResume" runat="server" Target="_blank" Text="" Visible="false" NavigateUrl=""></asp:HyperLink>
                        <asp:Label ID="lbl_NoResume" runat="server" Text="" Visible="false">No Resum&#233; on file</asp:Label>
                    </td>
                </tr>
                </table>
            </td>
        </tr>
 
        <tr><td colspan="4">&nbsp;</td></tr>
        <tr><td colspan="4">&nbsp;</td></tr>
        
        <tr><td colspan="4" class="EmployerWizardSummaryHeader">References
            <hr style="color:Teal" /></td></tr>
        <tr><td colspan="4">&nbsp;</td></tr>
        <tr><td colspan="4" class="EmployerWizardSummaryHeader">Job Filter
            <hr style="color:Teal" /></td></tr>
        </table>
 
    </td>
</tr>
</table>    
 
 
</asp:Content>

Open in new window

IE-Screenshot.gif
FirefoxScreenshot.gif
0
Comment
Question by:spaceneedlejumper
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
sunithnair earned 1000 total points
ID: 23649219
Try replacing line 21-28 like this. Also try to put &nbsp; for empty spaces inside the table <td> <td> to be replaced with <td>&nbsp;</td>
        <tr>
            <td class="EmpWizard1">&nbsp;</td>
            <td class="EmpWizard2">EDCC ID Number:</td>
            <td class="EmpWizard3" style="width:20px;">&nbsp;</td>
            <td class="EmpWizard5">
                <asp:Label ID="lblStu_EDCCID" runat="server"></asp:Label>
            </td>
        </tr>
 
 
Firefox replace line 111 like this
 
                <table width="250px" border="0" cellpadding="0" cellspacing="0" align="center">

Open in new window

0
 

Author Comment

by:spaceneedlejumper
ID: 23649269
Thanks sunithnair,

The nbsp's were already in every empty table cell, it's just that the code parser up here at expert's exchange makes them blanks when it converts my code.

Your solution for Firefox worked flawlessly!

I decided to break up the table into several smaller tables and that fixed the layout problems with IE.

Thank you for your help.

Travis
0
 

Author Closing Comment

by:spaceneedlejumper
ID: 31547275
Thank you very much!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
Several part series to implement Internet Explorer 11 Enterprise Mode
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses

868 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