IE 中的浮动问题

发布于 2024-08-25 11:41:14 字数 345 浏览 3 评论 0原文

好吧,我正在制作一个模拟操作系统类型界面。它应该打开窗口并有一个拖动手柄。这一切都很完美。然后我添加了一个退出按钮的图像,我浮动到右侧......这让 IE 很生气,IE 因尺寸和定位而陷入困境 =[

我已经尝试了很多东西。没有一个有效。有人想帮忙吗?

网站是

http://opentech.durhamcollege.ca/~intn2201/brittains/labs/< /a>

谢谢 谢尔比

Ok I am making a simulated OS type interface. It should open up windows and have a drag handle. This all works perfectly. Then I added a image for an exit button I floated to the right... this made IE mad and IE screwed with the sizing and positioning =[

I've tried a crap load of things. None of which work. Anyone wana help?

website is

http://opentech.durhamcollege.ca/~intn2201/brittains/labs/

Thanks
Shelby

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

苯莒 2024-09-01 11:41:15

另一种解决方案是根本不使用浮动。

#dragHandle { 
  position: relative; 
}

#windowExitImage {
  position: absolute;
  top: 4px;
  right: 0px;
}

这将更好地跨浏览器工作,并且无需 IE6/7 特定的 CSS 规则。

Another solution would be to not use floats at all.

#dragHandle { 
  position: relative; 
}

#windowExitImage {
  position: absolute;
  top: 4px;
  right: 0px;
}

This will work better cross-browser and remove the need for an IE6/7 specific CSS rule.

童话里做英雄 2024-09-01 11:41:14

这是 IE 6 和 IE 的问题。 7:
http://blogs.msdn.com/askie/archive/2009/03/23/right-floated-element-in-internet-explorer-8-is-positioned- different-than-internet-explorer-7.aspx

我能想到的唯一解决方案是这样的:

<!--[if lte IE 7]>
    <style type = "text/css">
        #windowExitImage{margin-top:-27px}
    </style>
<![endif]-->

因为它在技术上是一个注释,所以只有后面的 IE 7 会注意到它。因此 IE 8 和其他浏览器将按照它们已经做的方式显示它,这实际上看起来是正确的。
http://css-tricks.com/how-to -创建仅 ie 样式表/

It's an issue with IE 6 & 7:
http://blogs.msdn.com/askie/archive/2009/03/23/right-floated-element-in-internet-explorer-8-is-positioned-differently-than-internet-explorer-7.aspx

The only solution I can come up with is something like:

<!--[if lte IE 7]>
    <style type = "text/css">
        #windowExitImage{margin-top:-27px}
    </style>
<![endif]-->

Because it's technically a comment, only IE 7 on back will pay attention to that. So IE 8 and other browsers will display it the way they already do, which does in fact look right.
http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

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