CSS 兼容性 IE7 - IE8 问题
问题:
感谢您花时间阅读本文。我遇到了一个问题,需要尽可能简单地解决。我正在重新开发一个网站,但是自从我更新到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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如另一个人所说,你的问题太宽泛了。你需要将其分解为更小的问题——这可能会帮助你自己解决它。
我确实注意到一件事: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 orignallyblock
elements. Either usespan
(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
div
s in your HTML. It's not necessary to wrap everyimg
, everyul
, etc. in it's owndiv
. Usually any styles you apply to thediv
can just as well be applied you the "wrapped" element directly.这不是一个很酷的主意...但是当您厌倦了像 ie6 或 ie5 这样的非常旧的浏览器时,您可以尝试...
1.使用 javascript 来检测浏览器和版本..
2.稍后使用类似的方式重定向访客下载 IE 8..
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..