0

当我清除时,IE 没有显示 Internet Explorer 无法正常工作,我遇到了一些问题:对;

<div style="border-width:1px 0 0 0; border-style:solid; border-color:#ffae00; height:100px; width:450px;">

<div style="border:1px solid #ffae00; height:100px; width:100px; margin:-1px; float:left;"> Image </div>
<div style="float:left; padding:10px 0 0 10px; height:70px;"> Topic </div>
<div style="float:right; padding:35px 30px 0 0; height:45px; width:50px;"> Select </div>
<div style="clear:right; text-align:center; height:20px; width:450px;"> more </div>

</div>

这是我的代码。在 chrome 中,我的“更多”div 就在它上面最右边的 2 个 div 下方,但在 IE 中,它似乎只使用 clear 两者。

有任何想法吗?

4

1 回答 1

0

弄清楚了。把右边的所有东西都放到自己的div里,然后用clear:both。因为它在自己的 div 中,所以它只影响最右边的 2 个 div。

<div style="border-width:1px 0 0 0; border-style:solid; border-color:#ffae00; height:100px; width:450px;">

<div style="border:1px solid #ffae00; height:100px; width:100px; margin:-1px; float:left;"> Image </div>

<div style="float:right; height:100px; width:349px;">
<div style="float:left; padding:10px 0 0 10px; height:80px"> Topic </div>
<div style="float:right; padding:35px 30px 0 0; height:45px; width:50px;"> Select </div>
<div style="clear:both; text-align:center; height:20px; width:100%;"> more </div>
</div>


</div>
于 2012-07-27T22:24:50.657 回答