IE 6 和 7 中的 YUI-css
如果您查看下面的屏幕截图,您会发现红色的右侧菜单框在 IE6 和 7 中的位置错误:
alt text http://horgenweb.org/yui.png
<div id="doc4" class="yui-t2"> //yui-t2 = 180px on the left
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-gc"> // yui-gc 2/3, 1/3
<div class="yui-u first">content</div> // 2/3
<div class="yui-u">right menu</div> // 1/3
</div>
</div>
</div>
<div class="yui-b">left menu</div> // 180px
</div>
<div id="ft">footer</div>
</div>
有人知道我如何解决这个问题吗?
If you look at the screenshot below you can see that the right menu box in red has the wrong position in IE6 and 7:
alt text http://horgenweb.org/yui.png
<div id="doc4" class="yui-t2"> //yui-t2 = 180px on the left
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-gc"> // yui-gc 2/3, 1/3
<div class="yui-u first">content</div> // 2/3
<div class="yui-u">right menu</div> // 1/3
</div>
</div>
</div>
<div class="yui-b">left menu</div> // 180px
</div>
<div id="ft">footer</div>
</div>
Anyone know how I can fix this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我疯狂地试图解决 IE7 中的这个浮动错误。我注意到该错误仅影响特殊网格 .yui-gc (2/3,1/3) 和 .yui-gd (1/3,2/3)。
因此,我对第一个单元进行了星型黑客攻击,以将单元的宽度减少 1% 或 2%。较小的宽度(在第一个单元上)允许单元在 IE7 中并排浮动。
.yui-gc .first {*宽度: 65% !重要;}
.yui-gd .first {*width: 31% !important;}
我希望这会有所帮助,如果有更好的解决方案,我会洗耳恭听。
I was going nuts trying to solve this float bug in IE7. I noticed the bug only affects special grids .yui-gc (2/3,1/3) and .yui-gd (1/3,2/3).
Therefore, I'm serving a star hack to the first unit to decrease the unit's width by 1 or 2 percent. The smaller width (on the first unit) allows the units to float side-by-side in IE7.
.yui-gc .first {*width: 65% !important;}
.yui-gd .first {*width: 31% !important;}
I hope this helps, and if there's a better solution, I'm all ears.