Internet explorer IE7.0中的2个div看起来与其他浏览器不同(简化)。如何修复?

Internet explorer IE7.0中的2个div看起来与其他浏览器不同(简化)。如何修复?,internet-explorer,cross-browser,internet-explorer-7,Internet Explorer,Cross Browser,Internet Explorer 7,我的html页面的这一部分(95%的代码被删除)在IE7.0(IE6.0未经测试)和其他浏览器中看起来仍然不同。有谁能告诉我如何修复IE7.0,使其与FF、Opera和其他产品的显示方式相同 <html > <body> <div style="margin: 0 100px 0 340px;"> <div style="margin-right: -103px; height:300px; border:1px solid #3c6; floa

我的html页面的这一部分(95%的代码被删除)在IE7.0(IE6.0未经测试)和其他浏览器中看起来仍然不同。有谁能告诉我如何修复IE7.0,使其与FF、Opera和其他产品的显示方式相同

<html >
<body>
<div style="margin: 0 100px 0 340px;">
    <div style="margin-right: -103px; height:300px; border:1px solid #3c6; float:right;">right is <br>different<br>when use<br>IE7.0. <br>Why?</div>
    <div  style="border:1px solid #c63; height:300px;">middle is OK</div>
</div>
</body>
</html>

当使用IE7.0时,右边是不同的<为什么?
中间的可以

这两个div在beetween中应该有一些空间,但IE7.0将它们显示在一起。

是负边距在起作用。这是构建内容的一种不同寻常的方式,所以IE处理的方式不同

如果你用一种更标准的方式来构建你的页面(在不知道你要完成什么的情况下,很难推荐如何使用更多的细节),你会遇到这样的边缘情况

但如果情况表明这是必须的,那么您可以添加
左边距:44px到右边距为负的div(根据需要调整44px)。这将导致:

<html>
<body>
<div style="margin: 0 100px 0 340px;">
    <div style="margin-right: -103px; margin-left:44px; height:300px; border:1px solid #3c6; float:right;">right is <br>different<br>when use<br>IE7.0. <br>Why?</div>
    <div style="border:1px solid #c63; height:300px;">middle is OK</div>
</div>
</body>
</html>

当使用IE7.0时,右边是不同的<为什么?
中间的可以

是负边距在起作用。这是构建内容的一种不同寻常的方式,所以IE处理的方式不同

如果你用一种更标准的方式来构建你的页面(在不知道你要完成什么的情况下,很难推荐如何使用更多的细节),你会遇到这样的边缘情况

但如果情况表明这是必须的,那么您可以添加
左边距:44px到右边距为负的div(根据需要调整44px)。这将导致:

<html>
<body>
<div style="margin: 0 100px 0 340px;">
    <div style="margin-right: -103px; margin-left:44px; height:300px; border:1px solid #3c6; float:right;">right is <br>different<br>when use<br>IE7.0. <br>Why?</div>
    <div style="border:1px solid #c63; height:300px;">middle is OK</div>
</div>
</body>
</html>

当使用IE7.0时,右边是不同的<为什么?
中间的可以