0

所以在这里我尝试做一些造型,主要是为了定位,这是我的代码:

<td>
   <img src="images/master/login_box.png" style="width: 351px; height: 280px; position: relative;
                margin-top: 35px; left: 14px" />

   <asp:Label ID="Label1" runat="server" Text="LOGIN" Font-Names="Century Gothic" Font-Size="13"
                ForeColor="White" Style="position: absolute; margin-top: -235px; margin-left: 35px"></asp:Label>

   <img src="images/master/Lock.png" style="width: 12px; height: 16px; position: absolute;
                margin-top: -235px; margin-left: 97px" />

   <asp:Label ID="Label2" runat="server" Text="REGISTER" Font-Names="Century Gothic"
                Font-Size="13" ForeColor="White" Style="position: absolute; margin-top: -235px;
                margin-left: 260px"></asp:Label>

   <asp:Label ID="Label3" runat="server" Text="User" Font-Names="Trebuchet MS" Font-Size="11"
                ForeColor="White" Style="position: absolute; top: 142px; margin-left: 35px"></asp:Label>

   <asp:TextBox ID="txtEmail" runat="server" Width="225px" Height="30px" Style="position: absolute;
                top: 133px; margin-left: 110px; -webkit-border-radius: 5px; -moz-border-radius: 5px;
                border-radius: 5px;"></asp:TextBox>

   <asp:Label ID="Label4" runat="server" Text="Password" Font-Names="Trebuchet MS" Font-Size="11"
                ForeColor="White" Style="position: absolute; top: 190px; margin-left: 35px"></asp:Label>

   <asp:TextBox ID="txtPassw" runat="server" Width="225px" Height="30px" Style="position: absolute;
                top: 180px; margin-left: 110px; -webkit-border-radius: 5px; -moz-border-radius: 5px;
                border-radius: 5px;"></asp:TextBox>

   <ul id="submit" style="position: absolute; top: 230px; margin-left: 110px">
                <li id="submit-1"><a href="#" title="Submit"><span>Submit</span></a></li>
            </ul>

    <img src="images/master/info.png" style="width: 10px; height: 11px; position: absolute;
                top: 277px; right: 160px" />

    <asp:Label ID="Label5" runat="server" Text="Forgot Password |" Font-Names="Century Gothic"
                Font-Size="7" ForeColor="White" Font-Italic="true" Style="position: absolute;
                top: 273px; right: 70px"></asp:Label>

    <asp:Label ID="Label6" runat="server" Text="Reactivate" Font-Names="Century Gothic"
                Font-Size="7" ForeColor="White" Font-Italic="true" Style="position: absolute;
                top: 273px; right: 15px"></asp:Label>

</td>

问题是,在 chrome 中的定位很好,它停留在它应该在的位置(标签、文本框等),但是当我在 IE 中尝试时,定位不正确,特别是对于(LOGIN、lock.png、REGISTER、用户和密码标签和文本框)他们转到屏幕的角落。关于我做错了什么有什么建议吗?一些友好的建议会很好,谢谢。

4

1 回答 1

0

找到了解决方案!

将 login_box.png 位置更改为绝对而不是相对修复了问题:D

于 2013-07-24T07:13:47.527 回答