简体   繁体   English

修复IE7浮动内部浮动错误

[英]fixing IE7 float inside float bug

in ie7 if you put a floated element inside a floated element to the same side the inside element just pushed far away outside the container element to the direction of the float. 在ie7中,如果将浮动元素放在浮动元素的同一侧,则内部元素只是朝着浮动方向推到容器元素之外。

consider this code 考虑这个代码

<div style="float: right">
<div style="float: right">
    some text
</div></div>

any solution for this bug?? 此错误的任何解决方案?

I tested with the given code in ie7, the text "some text" went to the right end only. 我在ie7中使用给定的代码进行了测试,文本“一些文本”仅到达了右端。 U can try with padding or margin. 您可以尝试使用填充或边距。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM