【发布时间】:2020-07-09 18:18:19
【问题描述】:
我遇到了 ie7 问题。在 Firefox 和 IE8 中似乎一切正常。
在 ie7 中,第一个元素可以正常工作,但所有其他元素都被下推,就像它们已明确应用一样。
图片最能说明这一点。
这是代码。
.newLabellg
{
float:left;
width:66px;
margin:3px 0 0 0;
font-weight:bold;
color:#000;
}
<div style="float:left; width:320px;">
<div style="margin-bottom:10px; float:left;">
<div class="newLabellg">Cusotmer#:</div>
<div style="float:left;">
<asp:TextBox ID="CustomerNumber" runat="server" Width="220px"></asp:TextBox>
</div>
</div>
<div style="margin-bottom:10px; float:left; clear:both;">
<div class="newLabellg">Cusotmer:</div>
<div style="float:left;">
<asp:TextBox ID="CustomerName" runat="server" Width="220px"></asp:TextBox>
</div>
</div>
<div style="margin-bottom:10px; float:left; clear:both;">
<div class="newLabellg" style="float:left;">Address:</div>
<div style="float:left;">
<asp:TextBox ID="Address" runat="server" Width="220px"></asp:TextBox>
</div>
</div>
<div style="margin-bottom:10px; float:left; clear:both;">
<div class="newLabellg">Mailing Address:</div>
<asp:TextBox ID="Address2" runat="server" Width="220px"></asp:TextBox>
<div style="float:left; margin:3px 0 0 0">
<asp:DropDownList ID="City" runat="server" Width="109px">
</asp:DropDownList>
<asp:DropDownList ID="Province" runat="server" Width="109px">
</asp:DropDownList></div>
</div>
</div>
知道 ie7 为何/在做什么,我该如何解决?
【问题讨论】:
标签: html css css-float internet-explorer-7