2

这段代码似乎在除 Firefox 之外的所有浏览器上都能正常运行。在 Firefox 上,每个表的第一行都正确对齐,但其余行则偏右。这是我的第一个网站,所以如果我没有遵循任何其他正确的编码实践,请告诉我。该网站是实时的,可以在 www.topclassfifa.com 查看硬币页面是与 Firefox 对齐问题的页面。

<div class="center">
 <table id="XboxTable1" cellspacing="0" cellpadding="0" width="1000" 
    align="center" dir="ltr">
        <tr>
            <td style="padding-left:50px; padding-right:50px; padding-top:0px; padding-bottom:0px;" align="center" width="333" colspan="0" rowspan="0">
                <asp:Image ID="Image7" runat="server" ImageUrl="~/Images/Xbox50kIcon.png" /></td>
            <td style="padding-left:50px; padding-right:50px; padding-top:0px; padding-bottom:0px;" align="center" width="334" colspan="0" rowspan="0"><asp:Image ID="Image8" runat="server" ImageUrl="~/Images/Xbox100kIcon.png"/></td>
            <td style="padding-left:50px; padding-right:50px; padding-top:0px; padding-bottom:0px;" align="center" width="333" colspan="0" rowspan="0"><asp:Image ID="Image9" runat="server" ImageUrl="~/Images/Xbox250kIcon.png" /></td>
    </tr>
        <tr>
            <td style="font-weight: bold; font-size:medium"; width="333" align="center"colspan="0" rowspan="0">
                <font color="#92C83E">£<%=Xbox50kPrice %></font></td>
            <td style="font-weight: bold; font-size:medium" width="334" align="center" colspan="0" rowspan="0">
                <font color="#92C83E">£<%=Xbox100kPrice %></font></td>
            <td style="font-weight: bold; font-size:medium" width="333" align="center" colspan="0" rowspan="0">
                <font color="#92C83E">£<%=Xbox250kPrice %></font></td>
    </tr>
        <tr>
            <td style="width: 333px" align="center" colspan="0" rowspan="0">
                <asp:Label ID="Label4" runat="server" Text="Quantity: " ForeColor="#92C83E"></asp:Label>
                <asp:DropDownList ID="DropDown50kXbox" runat="server" Width="44px" 
                    onselectedindexchanged="Changed50kXbox" AutoPostBack="true" BackColor="#0168D4" 
                    ForeColor="#92C83E">
                    <asp:ListItem>0</asp:ListItem>
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width: 334px" align="center" colspan="0" rowspan="0">
                <asp:Label ID="Label5" runat="server" Text="Quantity: " ForeColor="#92C83E"></asp:Label>
                <asp:DropDownList ID="DropDown100kXbox" runat="server" Width="44px" 
                    onselectedindexchanged="Changed100kXbox" AutoPostBack="true" BackColor="#0168D4" 
                    ForeColor="#92C83E">
                    <asp:ListItem>0</asp:ListItem>
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width: 333px" align="center" colspan="0" rowspan="0">
                <asp:Label ID="Label6" runat="server" Text="Quantity: " ForeColor="#92C83E"></asp:Label>
                <asp:DropDownList ID="DropDown250kXbox" runat="server" Width="44px" 
                    onselectedindexchanged="Changed250kXbox" AutoPostBack="true" BackColor="#0168D4" 
                    ForeColor="#92C83E">
                    <asp:ListItem>0</asp:ListItem>
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                </asp:DropDownList>
            </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>       
    </tr>
        <tr>
            <td style="width: 333px; font-weight: bold; font-size:large" align="center" colspan="0" rowspan="0">
                <font color="#92C83E">£<%=Xbox50kTotal %></font></td>
            <td style="width: 333px; font-weight: bold; font-size:large" align="center" colspan="0" rowspan="0">
                <font color="#92C83E">£<%=Xbox100kTotal %></font></td>
            <td style="width: 333px; font-weight: bold; font-size:large" align="center" colspan="0" rowspan="0">
                <font color="#92C83E">£<%=Xbox250kTotal %></font></td>
    </tr>

4

1 回答 1

0

尝试从标签中删除rowspan="0"andcolspan="0"属性。<td>

于 2012-11-30T19:43:29.627 回答