0

我在下面有一个代码片段,其中内部的内容#FirstDiv在运行时附加,并且不断增加。

在 Firefox 和 Chrome 中,当内容在页面上占用额外的垂直空间时,#SecondDiv内容会向下移动。#FirstDiv但是,在 IE9 中不会发生这种情况,因为它的内容#FirstDiv#SecondDiv重叠。

 <div id="FirstDiv">html content</div>
 <div id="SecondDiv" style="clear:both;"></div>

更新 :-

我已经在http://jsfiddle.net/msach/Tycwp/1/更新了 div1 和 div2 的 css 。请帮忙。

4

2 回答 2

0

你的第二个 div 没有关闭

 <div id="FirstDiv">html content</div>
 <div id="SecondDiv" style="clear:both;"></div>
于 2013-01-23T09:29:43.390 回答
0

我能够通过将高度作为自动给上 div 来解决问题

于 2013-01-27T13:18:09.673 回答