处理Firefox和Internet Explorer的差异 [英] Dealing with Firefox and Internet Explorer's Differences

查看:118
本文介绍了处理Firefox和Internet Explorer的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是因为我刚刚发现我的网站在IE7和IE8的兼容性模式看起来确定,但在FF它是所有搞砸了。





感谢您,Richard

/ p>

解决方案

如果你的布局是完全不同的,最好的解决方案是回去,重新思考你的布局/ CSS。老实说,我从来没有需要两个样式表 - 一个用于FF,另一个用于IE。



一个非常有用的工具是重置样式表,例如埃里克迈尔提供的一个。这会将您的大部分元素重置为多个浏览器之间一致的状态。



体贴和耐心的开发可以产生一个样式表(这里简单化,不考虑重置。 css,text.css等),将工作的FF和IE。



我建议你下载 Firebug,一个firefox插件,并开始工作你的方式通过你的风格。安装 IE开发工具栏 - kinda的IE的Firebug。如果您想要同时测试多个版本的IE,请查看 IETester



设计网站是一个冗长的过程 - 不要采取捷径:)训练自己在布局时要努力。不要妥协,从长远来看,它会对你有好处!


This question is because I just found out that my site is looking ok in IE7 and in IE8 with compatibility-mode, but in FF it is all screwed up.

What would be the best way to go about it.

Separate CSS files?

Thanks, Richard

解决方案

If your layouts are radically different, the best solution would be to go back and re-think your Layout/CSS. In all honesty, I have never needed two styles sheets - one for FF, and another for IE.

One very helpful tool is a "reset stylesheet", like the one Eric Meyer provides. This resets much of your elements to a state that is consistent between multiple browsers.

Thoughtful and patient development can result in a single stylesheet (being simplistic here, not considering reset.css, text.css, etc.) that will work for both FF and IE.

I would suggest you download Firebug, a firefox addon, and start working your way through your styles. It will be helpful to install the IE Developer Toolbar too - kinda the Firebug of IE. And if you want to test multiple versions of IE simultaenously, check out IETester.

Designing a site is a tedious process - don't take short cuts :) Train yourself to be hard-up when it comes to layouts. Don't settle for any compromises - it'll benefit you in the long run!

这篇关于处理Firefox和Internet Explorer的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆