[英]how to force google chrome/firefox to use Internet explorer web browser control
I have developed a web page which is very much compatible with IE8. 我已经开发了一个与IE8非常兼容的网页。
Now the problem is that alignment of certain elements like span, radio button etc appear to be different in google chrome and firefox!! 现在的问题是,在谷歌浏览器和Firefox中,某些元素(例如跨度,单选按钮等)的对齐方式似乎不同!
Is there any way with which I can force the Firefox and chrome to parse and render the webpage exactly like IE8?? 有什么方法可以强制Firefox和chrome像IE8一样解析和呈现网页? I tried adding meta tags
我尝试添加元标记
<meta http-equiv="X-UA-Compatible" content="ie=8">
I also tried 我也试过
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
But that doesnt seem to work. 但这似乎不起作用。
I tried using IE_Tab which made the content in chrome exactly look like how it looks in IE. 我尝试使用IE_Tab ,它使chrome中的内容看起来完全像IE中的样子。 But its not possible to make all users install this, so is there a way in which i can direct browsers to use the IE Webbrowser control by any means ?!
但是不可能使所有用户都安装此程序,所以有没有一种方法可以指导浏览器以任何方式使用IE Webbrowser控件? Is there any scripts/code snippet which will instruct/redirect the browser to do this??
是否有任何脚本/代码段将指示/重定向浏览器执行此操作?
I would recommend making the page look correct in browsers that follow web standards first (Firefox, Chrome). 我建议使页面在首先遵循Web标准的浏览器(Firefox,Chrome)中看起来正确。 Then fix up for IE later.
然后为IE修复。 There is no way to do what you're suggesting.
无法按照您的建议去做。 Those meta tags are for making later versions of IE behave like earlier versions.
这些元标记用于使IE的更高版本表现得更早。
Coding for IE8 first is going to cause you many headaches, even later version of IE will have issues. IE8的编码首先会引起您很多头痛,即使更高版本的IE也会出现问题。 You are much better off coding for Chrome or Firefox first as they are much more standards compliant, and then make tweeks so IE8 looks OK.
您是关,因为它们更符合标准的编码Chrome或Firefox首先要好得多,然后进行tweeks所以IE8看起来OK。
If you insist on coding for IE first, code to IE10 first as its more standards compliant than IE8. 如果您坚持要先为IE编码,请先编码为IE10,因为它比IE8更符合标准 。 If you insist on IE8 first, then every other browser will just look bad :)
如果您首先坚持使用IE8,那么其他所有浏览器都会看起来很糟糕:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.