CSS 兼容性 IE7 - IE8 问题

发布于 2024-10-29 06:50:18 字数 343 浏览 5 评论 0原文

问题:

感谢您花时间阅读本文。我遇到了一个问题,需要尽可能简单地解决。我正在重新开发一个网站,但是自从我更新到IE8后,我完全忘记了IE7,但是当然,仍然有人在使用它。

我需要知道应该更改哪些具体内容以使该网站以与 IE8 中相同的方式显示。但我不知道从哪里开始。有哪位有这方面经验的人可以给我指导吗?有这样做的脚本吗?

URL:http://www.testsite.c-tz.nl/

如果您查看此内容IE8看起来很完美。

但如果你用IE7查看,事情就不一样了,非常难看。

Problem:

Thanks for taking the time to read this. I'm having a problem which I need to solve as simple as possible. There's a website I'm re-developing, but since I updated to IE8, I've totaly forgotten about IE7, but ofcourse, there are still people using it.

I need to know what specific things I should change for this site to display the same way as it does in IE8. But I don't know where to start. Is there anyone with experience in this, who can give me a guideline? Are there scripts for doing so?

URL: http://www.testsite.c-tz.nl/

If you view this with IE8 it looks perfect.

But if you view it with IE7, things are not where they supposed to be, very ugly.

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

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

发布评论

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

评论(2

£噩梦荏苒 2024-11-05 06:50:18

正如另一个人所说,你的问题太宽泛了。你需要将其分解为更小的问题——这可能会帮助你自己解决它。

我确实注意到一件事:IE 在元素上的 display: inline-block 存在问题,这些元素原本是 block 元素。要么使用 span (仅当它不包含块元素时才可能),或者使用其他方法并排放置块,例如浮动。

顺便说一句,您的 HTML 中有太多 div 。没有必要将每个 img、每个 ul 等都包装在它自己的 div 中。通常,您应用于 div 的任何样式也可以直接应用于“wrapped”元素。

As the other said, your question is to broad. You'll need to break it down in smaller problems - which will possibly help you solve it yourself along the way.

One thing I did notice: IE has problems with display: inline-block on elements, which were orignally block elements. Either use span (only possible if it doesn't contain block elements), or use another method to places blocks side by side such as float.

BTW, you have far too many divs in your HTML. It's not necessary to wrap every img, every ul, etc. in it's own div. Usually any styles you apply to the div can just as well be applied you the "wrapped" element directly.

心如狂蝶 2024-11-05 06:50:18

这不是一个很酷的主意...但是当您厌倦了像 ie6 或 ie5 这样的非常旧的浏览器时,您可以尝试...

1.使用 javascript 来检测浏览器和版本..

2.稍后使用类似的方式重定向访客下载 IE 8..

<script>
 if(''+browserName+''+fullVersion+'' == "Microsoft Internet Explorer6.0" )
{

alert("You're using an Old Browser.Update the browser to view the website.(or) Try Latest Google Chrome , Firefox , Safari, Opera")
window.location = "http://www.microsoft.com/download/en/details.aspx?id=43" 
}
//document.write(''+browserName+''+fullVersion+''); 
</script>

This is not a cool idea... But you can try when you are sick with very old browsers like ie6 or ie5 ...

1.use javascript to detect the browser and version..

2.later use the similar way to redirect the visitor to download the IE 8..

<script>
 if(''+browserName+''+fullVersion+'' == "Microsoft Internet Explorer6.0" )
{

alert("You're using an Old Browser.Update the browser to view the website.(or) Try Latest Google Chrome , Firefox , Safari, Opera")
window.location = "http://www.microsoft.com/download/en/details.aspx?id=43" 
}
//document.write(''+browserName+''+fullVersion+''); 
</script>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文