IE 6 和 7 中的 YUI-css

发布于 2024-08-25 10:02:41 字数 738 浏览 3 评论 0原文

如果您查看下面的屏幕截图,您会发现红色的右侧菜单框在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

溺孤伤于心 2024-09-01 10:02:41

我疯狂地试图解决 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文