Html ie7下压浮子

Html ie7下压浮子,html,css,css-float,internet-explorer-7,Html,Css,Css Float,Internet Explorer 7,我有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;">

我有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>
.newLabellg
{
浮动:左;
宽度:66px;
保证金:3px0;
字体大小:粗体;
颜色:#000;
}
库索特默:
顾客:
地址:
邮寄地址:

知道ie7为什么/做什么以及我如何修复它吗?

只需从以下每个实例中删除
clear:both

<div style="margin-bottom:10px; float:left; clear:both;">

使它在我用IE7/8+Firefox测试的浏览器中看起来正确


如果删除
clear:both
会导致不同的问题,请告知我们,我们可以找到解决方法。

只需从以下每个实例中删除
clear:both

<div style="margin-bottom:10px; float:left; clear:both;">

使它在我用IE7/8+Firefox测试的浏览器中看起来正确


如果删除
clear:both
会导致不同的问题,请告诉我们,我们可以找到解决方法。

我想说的唯一合乎逻辑的结论是
clear:both
会导致问题,因为这是第一项没有的唯一样式

float
+
clear
在同一个元素上导致IE7内异常


我想说唯一合乎逻辑的结论是,
清楚:两者都会造成问题,因为这是第一项所没有的唯一样式

float
+
clear
在同一个元素上导致IE7内异常


我试试这个,然后再给你回复。但我得说清楚。很清楚:两者都应该只适用于该元素,而不适用于其子元素?这实际上是一个ie7 bug,对吗?@Adam:@Julian答案中的链接证实了这是一个ie7 bug,有一些变化——“ie7-/Win:同一元素上的float+clear存在问题”。谢谢你,这就成功了。奇怪,我以前从未遇到过这个问题。我会试试这个,然后再给你回复。但我得说清楚。很清楚:两者都应该只适用于该元素,而不适用于其子元素?这实际上是一个ie7 bug,对吗?@Adam:@Julian答案中的链接证实了这是一个ie7 bug,有一些变化——“ie7-/Win:同一元素上的float+clear存在问题”。谢谢你,这就成功了。奇怪,我以前从未遇到过这个问题。